Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

What would be the best way to set up Google Analytics to track multiple domains which actually are all one site?

Example:

mysite.com

mysite.es gets routed to mysite.com/es, URL is mysite.es mysite.es/contenidos/stuff gets routed to mysite.es/contents/stuff, URL is mysite.es/contenidos/stuff

I've already taken care of the technical side of this, but I'm just not sure about what's the best way to proceed with analytics. Any help would be much appreciated.

share|improve this question

3 Answers 3

When you create your analytics profile for your site you can choose to track:-

  • A single domain
  • One domain with multiple subdomains
  • Multiple top level domains

Choose the most appropriate option for your URI structure and you're done.

enter image description here

share|improve this answer

It seems as though with the redirects in place you're not actually needing to track multiple domains, rather you're looking for a way to segment your single domain based on the sections that the additional domains are redirecting to (IE you want to segment your domain based on example.com vs example.com/es) assuming I am understanding properly it seems filters would be the easiest way. Simply create an additional profile for the site and filter out traffic to suit your needs.

share|improve this answer

I activated that one, and when I did the traffic seemed to be dropping... the current code I have (was not set up by me) and is:

<script type="text/javascript">
var _gaq = _gaq || [];
<% if Rails.env == "production" -%>
_gaq.push(['_setAccount', 'UA-xxxxxx26-1']);
_gaq.push(['_setDomainName', '.sitename.it']);
_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);
})();
<% end -%>
</script>

and what i don't get is the .sitename.it

anybody knows?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.