Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Analytics Event Tracking not showing up

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?

like image 900
Aldee Avatar asked Jan 16 '14 04:01

Aldee


People also ask

Why are events not showing up on Google Analytics?

If your events aren't showing up in Google Analytics, there are a few common issues you should look for. Are you using the correct api_secret? Check that you're using the api_secret for the right stream. If you set up the measurement protocol for multiple streams, each stream will have its own secret.

How long does it take for events to show up in Google Analytics?

So how long does it take for Google Analytics to start tracking? You'll need to wait 24-48 hours after setting up your Google Analytics property to see your data.

Why is Google Analytics real-time not working?

If you don't see any data at all in your Real-Time reports, the most likely cause is either in the Google Analytics tracking code or GA/GTM misconfiguration. You should check your tags in Google Tag Manager, Google Analytics filters, and also use browser extensions for debugging.


1 Answers

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.

like image 85
Petr Havlik Avatar answered Oct 14 '22 06:10

Petr Havlik