1

Is it possible to use a single Google Analytics account for a large number of sites, all with different domains?

If yes, can I access data for each site using the Analytics API

2

When you say 'Google analytics account', do you mean the actual account ID or are you referring to the property ID? A single Google Account can have multiple properties. Each property can be used to track a different domain. This would be the best practice if you are tracking multiple domains. In the second case, though it is possible, it's not wise to track multiple domains with a single property. You would not easily be able to track data distinctly for each domain as everything would be aggregated.

1

If you mean a property to track "all domains" as 1 UA number (property), then filtering by domain, then yes. You can do it by making a custom property then appending a custom linker onto the individual sites tracking script(s). The custom code part fires requests through a secondary "router" which then pushes the combined events into GA. So each script would actually have 2 UA numbers -- its own property UA and the linker UA for the shared "all domains" router->property.

And yes, you should be able to use the API to pull the pool data, just create filters per domain in the requests. It still depends on how specific you need the data, but thats the benefit of having each domain on its own property too.

Example of all domains router script:

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-00000000-00', 'auto', {'allowLinker': true});
  ga('require', 'linker');
  ga('linker:autoLink', ['mydomain.com, otherdomain1.com, otherdomain2.com, otherdomain3.com, otherdomain4.com, otherdomain5.com, otherdomain6.com, otherdomain7.com'] );

  ga('send', 'pageview');

</script>

Example of domain specific script:

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-11111111-11', 'auto');
  ga('send', 'pageview');

  ga('create', 'UA-00000000-00', 'auto', {'name': 'appTracker', 'allowLinker': true});
  ga('appTracker.require', 'linker');
  ga('appTracker.linker:autoLink', ['analytics.mydomain.com'] );
  ga('appTracker.send', 'pageview');
</script>

Here is a guide to get it set up. Pardon the forum drop, I will put it on a my site at some point: http://forum.opencart.com/viewtopic.php?f=24&t=131907

And here are the GA filters to see domains within a shared property: https://support.google.com/analytics/answer/1012243?hl=en

1

Your question can have multiple interpretations. The fact that you can create one account with up to 50 properties, one for each domain, has been explained already. Also, a property can contain 25 views. The architecture can be done to your liking. I would recommend reading this: https://support.google.com/analytics/answer/1009618?hl=en

But you can also indeed stack pageviews and sessions to one property for different domains. GA does contain a dimension called “hostname” which you can use to segment or filter. Even in the API.

There are some downsides to this last method. Especially view settings-wise. When you have GA360 you could use a rollup report. That would be the nicest way to accomplish a stacked view of different domains.

0

nyuen has explained it very well. One Google account can be used to track date of several website, you just add the domains and can analyse data for all. As you add a website, a property is generated. So every website has its unique property id in Google analytics.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy