Mikey Hogarth
Mikey Hogarth

Reputation: 4702

Google Analytics - one UA for multiple domains

We produce a white label site and our managers want to track usage accross all users of our product. Each user is on a different domain. Management do not want to create a new UA code for each customer. They want one UA code, and for that to be the repository for all data collected across all domains.

It's the exact same product on all domains, but skinned differently.

Google Analytics only allows you to specify one default domain when you set up a UA code. Requests from other domains do not have their visits registered against that UA code. It is looking very much like you are required to specify one UA code per domain.

  1. Is this true or is there a way of specifying multiple domains in google analyics? (if so, how?)
  2. If there isn't, does anyone know of any alternative analytics programs that allow you to collect data from multiple domains into the same bucket?

Upvotes: 1

Views: 1746

Answers (1)

Eike Pierstorff
Eike Pierstorff

Reputation: 32780

The domain in the settings has mainly cosmetical value (1). The Google Analytics Code will work on all domains, unless you set the cookie domain to a specific domain name (in which case the code cannot set cookies on other domain names and will fail to work).

In Universal Analytics a tracker that works on all domains would be created with

  ga('create', 'UA-XXXXXXXXX-1', 'auto');

"Auto" meaning that the cookie domain is set to window.location.hostname.

In classic Analytics you'd simply remove any setDomainName-Calls from the tracking code (if any).

If you want to track multiple domains as one you'd need cross domain tracking, but that does not seem to be your usecase.


1 Google Analytics reports display only url paths by default. If you hit the "view page" icon (a small square after the url path in some reports) Google Analytics will try to open the url in a new browser windows and will preprend the domain name from the settings. As far as I can tell this is the only use for that setting

Upvotes: 2

Related Questions