Google analytics event tracking not working.

Posted by Cato Johnston on Stack Overflow See other posts from Stack Overflow or by Cato Johnston
Published on 2010-02-24T21:11:57Z Indexed on 2010/04/18 3:03 UTC
Read the original article Hit count: 322

Filed under:

I have this code setup to track image downloads throught Google Analytics.

<a href="/media/37768/CC20100117m001_thumb_2000.jpg"
    onclick="pageTracker._trackEvent('Image', 'Download', 'file.jpg');" 
    class="hi-res track">
Hi-Res</a>

But the events don't ever show up in the GA reports.

I thought maybe the the browser was following the link before the javascript was being run but setting href="#" doesn't work either.

Any ideas?

© Stack Overflow or respective owner

Related posts about google-analytics