Support » Plugin: WP Google Analytics Events » Click tracking not working

  • Resolved gaiusjaugustus

    (@gaiusjaugustus)


    Hi, I’ve added click tracking to my site, and checked to see if it was working. I’ve had no issues with the plugin.

    But today, I added a new tracker, and now the click tracking doesn’t appear to be working for any of my buttons.

    Double checked the classes, and everything matches fine. Not sure how else to troubleshoot.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Looking at my analytics, it looked like tracking stopped coming through February 15th, if that helps.

    Plugin Author yuvalo

    (@yuvalo)

    Hi @gaiusjaugustus,

    Our plugin doesn’t support multiple trackers at the moment. It will just use the default one when sending out events.
    It shouldn’t stop the tracking altogether though.

    How did you add the tracking code?

    Yuval

    I must not be expressing myself right. Let me try again.

    On the “Click Tracking” page, I added a new Element. I went to track that element on Google Analytics to be sure it was working, and noticed that no events were being tracked from GA Events. Everything was working until Feb 15th, when all elements stopped being tracked.

    Does that make more sense?

    Plugin Author yuvalo

    (@yuvalo)

    Oh, got it, sorry.

    Can you send me a link to the page? May be able to tell what is going on there.

    Thanks,
    Yuval

    Tracking isn’t working for any buttons on any pages.

    Including, but not limited to:
    https://gaiusjaugustus.com/fs2i-waitlist/ (all buttons have tracking elements)
    https://gaiusjaugustus.com/ (Learn How button)
    https://gaiusjaugustus.com/work (Top 3 buttons have tracking elements)

    Thanks. Fingers crossed it’s something simple.

    Plugin Author yuvalo

    (@yuvalo)

    Hi @gaiusjaugustus,

    I can see that you are using Google Tag Manager on the website but set the plugin to work with the Universal Tracking code.
    Try giving this guide a try and let me know if it works:
    https://wpflow.com/knowledgebase/google-tag-manager-support/

    Yuval

    Set it up with Google Tag Manager.

    Unfortunately, events are still not tracking for any tracking elements.

    Plugin Author yuvalo

    (@yuvalo)

    Have you made other changes along the way? I’m seeing a different problem now that is not related to our plugin but breaking our plugin.

    There is a javascript error that prevents our snippet from runnning:
    AnimOnScroll.js:12 Uncaught TypeError: Cannot read property ‘id’ of null
    at AnimOnScroll._init (AnimOnScroll.js:12)
    at new AnimOnScroll (AnimOnScroll.js:11)
    at main.js:1

    Can you please take a look?

    Thanks,

    Yuval

    The only change I’ve made was temporarily deactivating my CloudFlare caching, which has been turned back on.

    Gaius

    Plugin Author yuvalo

    (@yuvalo)

    Hi @gaiusjaugustus

    Things are looking better now, but I have found another issue –
    Let me start off, that you did set things up correctly, but we need you to make a slight adjustment.

    In the https://gaiusjaugustus.com/ page, you set the element name to point to a div, which is usually fine, but in this specific case, has a link under it.
    When someone clicks the button, the page navigates before the event finishes firing.
    We do have a way to handle such cases when the element you want to track is a link. In those cases, we add a short delay as recommended by Google Analytics.

    To solve this issue you can do one of two things:
    1. Change the element name to a class or an id that the button link has – like kt-btn-0-action
    2. Enable advanced mode, then use the element name – “.CTALearnHow a”, then set the type to advanced. (just copy everything between the quotes, without them)

    Yuval

    I tried this with 2 different links, and no luck:

    1) https://gaiusjaugustus.com (Learn How link Above the Fold)
    Element: .CTALearnHow div a
    Type: Advanced

    2) https://gaiusjaugustus.com/work (All Infographics button)
    Element: see-all-infographics
    Type: class

    Then tested them through Google Analytics. Still not showing these events. :\

    I disabled CloudFlare to see if that would fix it for me, but no luck.

    Worked around my settings a bit and fixed buttons as suggested above.

    Was able to fix this issue.

    Turned off Tag Manager options and “Don’t add the GA tracking code” option.

    Seems to be working now. Thanks to everyone for the help in getting me back on track!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Click tracking not working’ is closed to new replies.