1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Why GA tracking beacon is being sent twice on page load?

Discussion in 'Google Analytics' started by Jeffr2014, Jan 8, 2016.

  1. #1
    While optimizing page loading times and doing speed tests, I noticed that the tracking beacon is being sent twice, first request is for page (utmt parameter is missing) and the second is for event (utmt=event). I checked few of my websites and it's the same everywhere. Here is the GA script I use:

    <script type="text/javascript">
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-1234567-8']);
    _gaq.push(['_setSiteSpeedSampleRate', 100]);
    _gaq.push(['_trackPageview']);
    (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'httpsXXX://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();

    Note: I inserted XXX after "https" here otherwise it wouldn't post as it DP editor tries to resolve the URL
    SEMrush
    Any ideas? Explanations?
     
    Jeffr2014, Jan 8, 2016 IP
    SEMrush
  2. David@CDNsun

    David@CDNsun Active Member

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    61
    #2
    Perhaps the culprit is this "_gaq.push(['_setSiteSpeedSampleRate', 100]);" or you have one more event tracking in your code.
     
    David@CDNsun, Jan 11, 2016 IP
  3. drues1986

    drues1986 Active Member

    Messages:
    61
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    68
    #3
    Remove the tracking code and try to put tag manager in website and track all of your analytics and different data through tag manager.
     
    drues1986, Jan 11, 2016 IP
    Jeffr2014 likes this.
  4. Jeffr2014

    Jeffr2014 Active Member

    Messages:
    254
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    55
    #4
    Thanks for recommendation. I am not familiar with tag manager, but will investigate.
     
    Jeffr2014, Jan 11, 2016 IP
  5. Jeffr2014

    Jeffr2014 Active Member

    Messages:
    254
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    55
    #5
    No, it cannot be. It shouldn't generate an event.
     
    Jeffr2014, Jan 11, 2016 IP