Search code examples
google-analyticsevent-tracking

Google Analytics Banner Ad Tracking


Ok, so I'm trying to figure out if the code that I'm using for Event tracking is wrong or if there is something that I need to do inside google analytics to make this code work. Any help would be appreciated!

<a href="http://kimerwin.yourkwagent.com/" onClick="_gaq.push(['_trackEvent', 'Banner', 'Click', 'Kim Erwin']);" target="_blank"><img class="aligncenter" src="http://www.padreislandbeach.com/wp-content/uploads/2015/03/kw-ad.jpg" alt="kw-ad" width="620" height="160" /></a>

Solution

  • For UA event tracking, the syntax should be:

    onClick="ga('send', 'event', 'Banner', 'Click', 'Kim Erwin');"