WordPress.org

Ready to get started?Download WordPress

Forums

Track Everything
using Page-ID to track items on specific pages - examples? (2 posts)

  1. zonacougar
    Member
    Posted 1 year ago #

    Love the plugin so far. You mentioned in your help that you can use page-id and a descendant selector to track events based on particular pages. Can you give an example of the proper syntax of that?

    Say, page ID is 257 and the selector is #getdigital img

    Thanks!

    http://wordpress.org/extend/plugins/track-everything/

  2. Nick Quinlan
    Member
    Plugin Author

    Posted 1 year ago #

    I'm glad you're liking the plugin!
    WordPress automatically adds classes to the body tag of a page, one of these is the page or post id.
    For pages the class and syntax are:
    .page-id-{{NUMBER}} (e.g. body.page-id-123 #element .element)
    For post the class and syntax are:
    .postid-{{NUMBER}} (e.g. body.postid-123 #element .element)

    In your example you would do:
    .page-id-257 #getdigital img

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic