: Do multiple domains for Google Analytics need to be setup when redirection is not setup for a root domain and it's www subdomain? I'm trying to find out whether our Google Analytics tracking
I'm trying to find out whether our Google Analytics tracking code is tracking hits to both our mydomain.com and mydomain.com addresses, even though both addresses resolve independently when visited (ie: www is a cname for mydomain.com in our dns settings, but our web server doesn't redirect mydomain.com to mydomain.com when visited and mydomain.com doesn't redirect to mydomain.com when visited either).
Our site is using the Standard Google Analytics Setup with Tradition Syntax:
<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">
try {
var pageTracker = _gat._getTracker("UA-xxxxxx-x");
pageTracker._trackPageview();
} catch(err) {}
</script>
Will the above track both our root and it's www subdomain or does the domain name also need to be set?
pageTracker._setDomainName('mydomain.com');
More posts by @Alves908
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.