Tracking event with GA
-
Setup events tracking for goal tracking, as below without using google tag manager.
Event Category = affiliate
Event Action = Page where the event happened path /conversion-page/
Event Label = Which affiliate link path was clicked /out/example/Is it possible with the plugin without adding a custom
onclick=”ga(‘send’
event? to each button?<a href=”www.examplewebsite.co.com” onclick=”ga(‘send’, ‘event’, ‘Category’, ‘Action’, ‘Label’, ‘Value’);”>
Meaning the plugin would do
<a href=”www.examplewebsite.com” onclick=”ga(‘send’, ‘event’, ‘Affiliate’, ‘{{Click URL}}’, ‘{{Affiliate partner}}’, ‘{{Value}}’);”>
This is easy above, but wonder if I could spare some time to do it automatically with the plugin and without using GTM, as it’s straight forward there as well. Try to stay away from extra layers of javascript.
- The topic ‘Tracking event with GA’ is closed to new replies.