• I am looking to add google analytics event tracking code to a few internal page links by adding

    onClick=”_gaq.push([‘_trackEvent’, ‘EVENTNME’, ‘CLICK’]);

    to the link’s <a href=” tag as in the example below

    <a href="link" onClick="_gaq.push(['_trackEvent', 'EVENTNME', 'CLICK']);>Image</a>
    

    However, when I go to load the website, the element (an image) isn’t loading. It appears that Wordfence is blocking it, and I don’t see where to whitelist this as valid code. Thank you.

    • This topic was modified 8 years, 2 months ago by charmedchicken. Reason: fixing the code
Viewing 1 replies (of 1 total)
  • Hi charmedchicken,

    What makes you think Wordfence is blocking it? If you disable Wordfence are you seeing the google tracking image?

Viewing 1 replies (of 1 total)
  • The topic ‘google analytics event tracking not working.’ is closed to new replies.