last friday we switched our website, http://www.ourweb.com tracking from “single domain” to “one domain to multiple sub-domains”, to track both http://www.ourweb.com and blog.ourweb.com
so i modified the code on the site:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-1594022-3");
pageTracker._trackPageview();
</script>
to (note we used traditional snippet before):
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-12345-1']);
_gaq.push(['_setDomainName', '.ourweb.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);
})();
but over last few days, site reported almost double returning visitors drop! from stable 7 000 down to 4 000
only returning visitors number changed that much, new visitors number keeps being similar (around 10 000)
i read this http://www.roirevolution.com/blog/2011/01/google_analytics_subdomain_tracking.php
and they write there that “The leading period causes cookie resets.”. is that the reason of such big visitors drop? should i remove the leading period? and if not, what else could be the reason?
ps. i just noticed that probably it’s referrals only problem. amount of visitors from referrals decreased from 4000 to around 700 per day after change.
visitors drop happened because there was no straight redirect between ourweb.com and http://www.ourweb.com
ourweb.com was displaying same site as http://www.ourweb.com, but with all links pointing to http://www.ourweb.com, and all 3000 return visits drop came from self referrals.
thus cookies were split between those two sites and created fake unique return visits (each time visitor visited ourweb.com and clicked f.ex. link to about.html, he was going to http://www.ourweb.com/about.html, so ga counted it as two independent unique return visits)
so basically reporting was wrong before and became more accurate.