Event Tracking not working - More than 96 hours

Discussion in 'Google Analytics' started by tangkw, Apr 23, 2012.

  1. #1
    Hi,

    Not sure why, but Event Tracking is not working on our blog. It's been 96 hours since implementation and testing links, and data isn't showing up in our GA account.

    Here's the code I built:


    <a href="http://feeds.feedburner.com/domainname.com" title="Subscribe to feed" rel="alternate" type="application/rss+xml" onClick="_gaq.push(['_trackEvent', 'Blog', 'Subscribe', ‘By RSS’]);"><img src = "http://www.domainname.com" align = "left" style ="padding-right:12px; padding-bottom:10px;" /></a>

    <a href="http://feeds.feedburner.com/domainname" title="Subscribe to my feed" rel="alternate" type="application/rss+xml" onClick="_gaq.push(['_trackEvent', 'Blog', 'Subscribe', ‘By RSS’]);">Subscribe via RSS</a>
    and here's our async code (I've redacted our UA Acct#):


    var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-xxxxxxxx-x']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();
    Any ideas? Other than Event Tracking, GA is working fine.

    Thanks,

    Kam
     
    tangkw, Apr 23, 2012 IP
  2. dipali

    dipali Peon

    Messages:
    450
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hey,

    1) Have you checked events in content section?, if not then check it and confirm whether your events are being displying or not. -- If it's showing then your done and if not showing then follow step 2


    2) Replace below event tracking code to your existing code. and wait for at least 4 hours then check your GA account.

    <a href="http://feeds.feedburner.com/example-blog" onClick="_gaq.push(['_trackEvent', 'Subscribe', 'RSS', 'Subscribe to RSS Feeds',, false]);">Subscribe to our feed!</a>


    If it wont show then let me know, will help you..
     
    dipali, Apr 27, 2012 IP
  3. tangkw

    tangkw Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi Dipali,

    Thanks for the reply.

    I went through your procedure and updated my code, as you suggested. The code update worked. I then investigated why your code worked and mine didn't and found that my code didn't use proper apostrophes in the various fields and this caused the error.

    Thanks once again for setting me on the right track,

    Kam
     
    tangkw, Apr 30, 2012 IP
  4. dipali

    dipali Peon

    Messages:
    450
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Cool, it worked :) :)
     
    dipali, May 3, 2012 IP
  5. MD1

    MD1 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hi Dipali,

    I am having the same issue as tangkw. I also tried the event tracking code on my website but it’s been 4 days now and I’m still seeing “0 total events” in my data. The GA code that I am using is:

    <script type="text/javascript">
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-27829365-1']);
    _gaq.push(['_trackPageview']);

    (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();

    </script>

    And the link text I am using is:

    <a href="http://itnterrancemcandrews.libsyn.com/privacy_policy" onClick="_gaq.push(['_trackEvent', 'Links', 'PolicyClicks', 'PrivacyPolicy',,false]);">Privacy Policy</a>

    Do you see anything wrong with my code? I tried inserting “,,false” like you suggested above but it did not work for me :(.

    Thanks,
    Mike
     
    MD1, May 6, 2012 IP
  6. MD1

    MD1 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    UPDATE:

    Hi Dipali,

    I noticed that at the very end of the code of my webpage is another Google Analytics script for a different account number. The code is in an area that is not visible when I’m editing my page on the back end of my blog host’s site (my page is a blog page). But it is visible when I view the source code of my page in my browser. I guess it was put there as part of the template by my blog host. I don’t have access to any of the data for that number though. I’m wondering if this could be the reason the data for my Analytics script is not recording properly. I’m going to test it out.

    Mike
     
    MD1, May 6, 2012 IP
  7. dipali

    dipali Peon

    Messages:
    450
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #7
    first can you tell me purpose of using event tracking to track privacy policy page ? is there any special reason behind it ? can you elaborate it so based on that i can suggest you best thing for you.
     
    dipali, May 10, 2012 IP
  8. MD1

    MD1 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Hi Dipali,

    Thank you for your response. Actually the privacy policy page tracking was just for testing purposes. I actually want to track my podcast plays but the testing of that was causing the statistics to become skewed. So I switched to the privacy policy link just for testing.

    After I deleted the second script, the tracking seems to be working fine. It wasn’t working very well yesterday or the day before. But today it seems to be working. So I guess it is fixed. The funny thing is that my blog host has a WYSIWYG editor that allows you to edit your blog page and the second Analytics script was not visible there. And even when I switched to my host’s html editor it still wasn’t visible. I tried to find a way to remove it and I guess now it’s working ok...

    Mike
     
    MD1, May 10, 2012 IP
  9. dipali

    dipali Peon

    Messages:
    450
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #9
    cool :) :) best of luck. do post your analytics related queries here. would love to help folks here :)
     
    dipali, May 11, 2012 IP
  10. alonrotenberg

    alonrotenberg Member

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #10
    i have the same problem..
     
    alonrotenberg, May 12, 2012 IP
  11. MD1

    MD1 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Thanks Dipali!
     
    MD1, May 13, 2012 IP