Gamersea
Gamersea

Reputation: 23

OnClick analytics not tracking (Wordpress Yoast Analytics)

I have a Wordpress site using the Google Analytics plugin by Yoast. At the bottom of my website I have a few buttons/images going to sellers of our product. I gave all those links unique Onclicks but they are just not working.

I've tried GA and gaq_push, Onmousedown and onclick but not seems to work. Anyone knows why?

Upvotes: 0

Views: 77

Answers (1)

Gamersea
Gamersea

Reputation: 23

So the right code for Yoast is:

onclick="__gaTracker('send', 'event', { eventCategory: 'your category', eventAction: 'your action', eventLabel: 'your label'});"

Notice the _gaTracker that is different from the standard GA trackingcode.

Upvotes: 1

Related Questions