0
votes

I have a strange issue with google Analytics on a website. This site normally has about 1000 - 1500 pageviews / day (and approximately 500-600 unique users).

Since a week analytics measures between 5000 and 15000 pageviews / day, but the unique users remains unchanged. I have never had so many pageviews / day in the last 2 years, so this values can't be correct.

I checked my Chrome network panel and noticed that http://www.google-analytics.com/collect?xxxx is triggered to often. Nothing has changed on the site, so what could cause such a behaviour?

An other problem is my bounce rate. Before I updated to Universal Analytics I used the following code to trigger an event gaq.push(['_trackEvent', 'Category', 'Action', undefined, 50, true]); ("true" to signalize a non-interaction-event).

After the update I used

 ga('send', 'event', 'xxx', 'xxx', 'xxx');

The bounce rate decreased to 0% (the events has been counted as "interaction-event").

I found the notice to use the following ga('set', 'nonInteraction', true); to set the non-interaction flag. But where should I use this?

Should I start with the analytics code to track the pageview

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-xxxxxx-xx', 'example.com');
  ga('require', 'displayfeatures');
  ga('send', 'pageview');

then set the non-interaction-flag ga('set', 'nonInteraction', true);

and at the end trigger an event in my page content e.g. onload="ga('send', 'event', 'xxx', 'xxx', 'xxx');" ?

2
Why are you triggering an event onload? You can do this for non-interaction events: ga('send', 'event', 'category', 'action', {'nonInteraction': 1}); Do you have any iframes or anything that could be throwing off the pageview count? Are there any particular pages where the count increased more, or is it even across the board? - maembe
I use "onload" for some images I have to track. OK, didn't know that I can use {'nonInteraction': 1} directly. No, I haven't any iframes on the page, and yes it looks like the problem occurs on all pages.@maembe - grundig

2 Answers

1
votes

see eventTrackerGuide.

non-interaction (optional) A boolean that when set to true, indicates that the event hit will not be used in bounce-rate calculation

Every hit after the code ga('set', 'nonInteraction', true); will be a non-interaction hit.

If you want make a specific hit to non-interaction, just add non-interaction option on the hit. For example: ga('send', 'pageview', {'nonInteraction': true});

0
votes

Try:

ga('send', 'event', 'xxx', 'xxx', 'xxx', undefined, true);

undefined - if you don't have a value of event