Google Analytics Event Tracking not showing up

Aldee picture Aldee · Jan 16, 2014 · Viewed 14.3k times · Source

I have this problem with google analytics wherein I cannot find the counted data to appear under the Behavior > Events > Top Events.

I am using the classic analytics. Here is the code I have:

    <script type="text/javascript">

      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-xxxxxxxx-1']);
      _gaq.push(['_setDomainName', 'domain.com']);
      _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>


    <script>
      // custom events:

      $(function() {

        $('button').each(function(){
            $(this).html($(this).data('event'));
        });

        $('button').click(function(){
            var event = $(this).data('event');
            _gaq.push(['_trackEvent', 'USER_INTERACTION', event, 'whatever babe']);
            console.log(event);
        });

      });


    </script>


    <button type="button" data-event="CLICKS_BUTTON_1"></button><br />
    <button type="button" data-event="CLICKS_BUTTON_2"></button><br />
    <button type="button" data-event="CLICKS_BUTTON_3"></button><br />
    <button type="button" data-event="CLICKS_BUTTON_4"></button><br />
    <button type="button" data-event="CLICKS_BUTTON_5"></button><br />
    <button type="button" data-event="CLICKS_BUTTON_6"></button><br />
    <button type="button" data-event="CLICKS_BUTTON_7"></button><br />
    <button type="button" data-event="CLICKS_BUTTON_8"></button><br />
    <button type="button" data-event="CLICKS_BUTTON_9"></button><br />
    <button type="button" data-event="CLICKS_BUTTON_10"></button><br />
    <button type="button" data-event="CLICKS_BUTTON_11"></button><br />
    <button type="button" data-event="CLICKS_BUTTON_12"></button><br />
    <button type="button" data-event="CLICKS_BUTTON_13"></button><br />
    <button type="button" data-event="CLICKS_BUTTON_14"></button><br />
    <button type="button" data-event="CLICKS_BUTTON_15"></button><br />

However, under the real time section, the event tracking data appeared and is okay. Is there any other necessary things (code) to implement in order to make it appear in the behaviour > events section?

Answer

Petr Havlik picture Petr Havlik · Jan 17, 2014

Aldee,

if the events show up in Real Time reports, then you are certainly fine and your setup is correct.

Real Time reports also reflect the filter setup, so if you can see the events fired by the users on your website, just be patient and wait for the raw data to be processed and displayed in Events report.

The data processing has changed recently and you can find all the details in the official GA documentation - see Data Limits section.

Processing latency is 24-48 hours. Standard accounts that send more than 200,000 visits per day to Google Analytics will result in the reports being refreshed only once a day. Daily processing begins at 12:00 UTC and continues for approximately 10 hours. This can delay updates to reports and metrics for up to two days. To restore intra-day processing, reduce the number of visits you send to < 200,000 per day.

Hope this helps.