WordPress.org

Ready to get started?Download WordPress

Forums

Track Everything
[resolved] Links on certain pages (4 posts)

  1. Wendihihihi
    Member
    Posted 7 months ago #

    Hi,

    Is it possible to track click on links on certain pages only? Example, link is on:

    .page-contact a.yarpp-thumbnail

    I don't want to use yarpp-thumbnail only because it will track also the clicks on other pages.

    How can I track .page-contact a.yarpp-thumbnail but not .page-sitemap a.yarpp-thumbnail? Can I use page-content yarpp-thumbnail?

    Thanks

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

  2. Nick Quinlan
    Member
    Plugin Author

    Posted 7 months ago #

    If you only want to track on one page, the simplest way to do this would be to use the Paige's body classes. In well built themes, each WordPress page has a selection of body classes. One of which is something like page-id-123. Find what your contact page's id is, and then you may use descendant selectors to only select the element on the contact page. Your final sector will be something along the lines of:
    .page-id-456 a.yarpp-thumbnail

    If however, I'm misinterpreting your question and each page does have the class of page-contact or page-sitemap then use that as the descendant selector, as it is easier to undertand:
    .page-contact a.yarpp-thumbnail

  3. Nick Quinlan
    Member
    Plugin Author

    Posted 7 months ago #

    Marking as resolved, as I have not heard back. Please let me know if you didn't get it working.

  4. Wendihihihi
    Member
    Posted 7 months ago #

    Sorry, I've been on holiday. I'm going to see if I can get it to work.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.