I have used _trackEvent for several links. But in google analytics it shows as 0 events and no tracking data are displayed.
Below is the code I used. Do I have to wait 24 hours to view the tracking data? or anything wrong with this?
onClick="_gaq.push(['_trackEvent', 'Links', 'Bags', 'Mainlinkbags']);"
var _gaq = _gaq || ;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script'); s.parentNode.insertBefore(ga, s)
Sometimes it is good practice to use "onmousedown" event instead of "onclick" because "onmousedown" is fired sooner, so GA script has more time to execute event tracking (it's only a few milliseconds difference, but can help). Try it.