Mobile app version of vmapp.org
Login or Join
Alves908

: 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

@Alves908

Posted in: #GoogleAnalytics

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');

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Alves908

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme