Mobile app version of vmapp.org
Login or Join
Kevin317

: One multi-domain analytics profile, or one analytics profiles per domain? I currently run a small web-app that connects local businesses with new customers in a very specific niche. In the past

@Kevin317

Posted in: #Analytics #GoogleAnalytics

I currently run a small web-app that connects local businesses with new customers in a very specific niche. In the past few months this model has worked very well and the growth is excellent, so much so in fact that I'm preparing to expand the app to support multiple sites/niches. Ultimately it will be structured very similarly to StackExchange in that each site will have it's own domain, design and focus, but running off of the same platform.

With that said, I've been trying to think of the best way to handle the analytics (specifically Google Analytics) for this setup.

My two requirements are basically that I want to be able to see aggregate statistics for all sites so that I can get an overview of how the system is performing generally on a day-to-day basis, but also be able to narrow down to specific site and track at that level for SEO, marketing, and debugging purposes.

What I'm hoping is that other people who may have done this or have more experience with Google Analytics may be able to tell me whether I would be better off creating one multi-domain analytics profile (and figuring out how to break it out by site) or creating a profile for each site and having the unique profile id configured with the sites in my system.

From a development standpoint I would much rather do the former.

Thank you in advance for your time and insights!

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Kevin317

3 Comments

Sorted by latest first Latest Oldest Best

 

@XinRu657

Use both! It's at the cost of page loading times, but it will give you detailed statistics.

Normally both code blocks don't conflict with each other.

10% popularity Vote Up Vote Down


 

@BetL925

There is further information about cross domain tracking here. As Jeff mentioned, cross domain tracking is not for the faint hearted but can be achieved with a few lines of jQuery code that picks out the links and adds the oppropriate tracking call. You may also need to add tracking calls to forms if they post between the domains.

If you are trying to see how your network of sites is performing as a whole and perhaps setup goals that involve multiple sites it is really the only way to go.

10% popularity Vote Up Vote Down


 

@Voss4911412

Neither method is perfect; both have their pros and cons.

It is definitely simpler to have one distinct Google Analytics key for every domain or subdomain. There is no question about this. However, that breaks down when you have, say, dozens or hundreds of domains.

If you have many SUBdomains using the same Google Analytics key, you must push the domain name on each request, like so.

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-5620270-24']);
_gaq.push(['_setDomainName', '.stackexchange.com']);
_gaq.push(['_trackPageview']);


Then you can segment fairly easily based on Hostname... just use the Advanced Segments dropdown in the top right and create a segment for hostname="gaming.stackexchange.com" or something similar.
You can even make aggregate segments hostname="gaming.stackexchange.com" OR hostname="webapps.stackexchange.com" OR hostname="cooking.stackexchange.com" etc.

If you have many different domains, it's much harder.


Call the _link() method in any links between the domains. If your current links have the form:

<a href="https://www.secondsite.com/?login=parameters">Login Now</a>

change them to:

<a href="https://www.secondsite.com/?login=parameters"
onclick="_gaq.push(['_link', 'http://www.firstsite.com']); return false;">Login Now</a>


For different domains, we simply use different Google Analytics keys..

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme