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

  1. zonacougar
    Posted 2 years 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



  2. Nick Quinlan
    Plugin Author

    Posted 2 years 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

  • Track Everything
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic