Last thursday I implemented a change to our GA script - I added the Enhanced Link Attribution and added the setDomainName attribute. Since then, most of our stats are fine, but the Average Visit Duration has gone completely insane.
We went from averaging around 4mins/visit to massive spikes every morning after midnight of visit times exceeding two hours. I figure it must be something I did wrong, as it started going out of control about the same hour that I deployed the change.
I don't want to flail about making changes on production until I can figure out the cause - any help or suggestions would be greatly appreciated.
Hourly analytics for Average Visit Duration:
The current GA script
var _gaq = _gaq || [];
var pluginUrl = '//www.google-analytics.com/plugins/ga/inpage_linkid.js';
_gaq.push(['_require', 'inpage_linkid', pluginUrl]);
_gaq.push(['_setCustomVar', 1, 'Locale', 'en_CA', 2]);
_gaq.push(['_setAccount', 'REDACTED']);
_gaq.push(['_setSiteSpeedSampleRate', 10 ]);
_gaq.push(['_setDomainName', 'REDACTED']);
_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);
})();
_setSiteSpeedSampleRate
at the same time ?