I'm looking to set up Google Analytics for a system we have. Essentially, we have a multi tenant system where everything shares a single code base but might have extra pages or not.

What I think I'm looking to do is listed on Google's documentation for cross domain tracking. However, each site / subdomain would be considered a different site, so I think I can leave out the bit about transferring visitor data between domains. I don't need to know if I user has come from site A to site B. I'm happy to consider it a unique user. It would be rare to happen, anyway, due to how the site is created.

Host names for the sites that come to the application can be in the format of:

  • abc.mydomain.com
  • def.mydomain.com
  • something-different.com
  • abc.something-different.com
  • ... anything

I realise that the first thought is probably 'If you say they're different sites, then track them with different accounts' but we're hoping to have the analytics for the entire application under one tracking ID, with profiles that have filters applied to them for the different sites.

This question is similar: One multi-domain analytics profile, or one analytics profiles per domain? but the answer from Jeff talks about the solution for different domains and the solution for different subdomains. Not both.

From the documentation, I think I just need to have the following

  _gaq.push(['_setDomainName', 'none']);


  • Am I off the mark with what I'm proposing to do?
  • Does anyone have experience with this sort of scenario - and what was your solution?
  • I say I'm looking to disregard the visitor data transfer, but is it something I need?
  • By setting '_setDomainName' to 'none', does this make the domain on the account mean nothing?

Thanks in advance.

1 Answer 1


You could achieve it using custom segments. there are limits on how many segments you can have.

A custom segment allows you to say something like: Where hostname like '%domain.com%'

  • Thanks - I played around with the segments and it's good for some things (new feature I didn't know about) but not quite what I'm looking for. For example, top content in descending order, for a given hostname. Rather than top content overall, with the individual stats. It seems to be working with separate profiles and filters on the hostname, but not sure if it's going to come back to haunt me :)
    – Jonathon
    Commented Sep 7, 2011 at 11:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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