Tuesday, 13 November 2012

Tracking multiple domains

The challenge
You might be in a situation where you want statistics, for the same service, across a multiple domains. One solution to this is to generate one new property for each domain in Google Analytics. Then you can implement one unique tracking code on each domain. However, that is not a good solution, as it's harder to then get an overview of all statistics.

The solution
The best (?) solution for solving this is by using filtering in Analytics. Below is a step by step description on how this can be done.

Create new web property
Create one new web property for your site.

The web property.

Create main profile
Create one profile, without any filters, used to log traffic from all domains.

Main profile.

Create filtered profiles
Create one profile, with filters, for each domain where you want to track visitors.

Overview of profiles.

The filters
The first filter is created to make sure the full URL does show in the tracking. This first filter is applied to all profiles, except the main "_allTraffic" (which will get no filters attached).

Filter to enable tracking of full URLs.

The second filter that has to be created is a filter to only include traffic from a specific domain / hostname. You create one filter for each domain you want to filter out.

Filter to include only hostname specific traffic.

Overview of all the filters.

Example of filters for one of the properties.

The result
The main property "_allTraffic" will track everything the default way.

Default tracking for the filter free main profile.

The other properties will track statistics for certain domains only, and you'll see (almost) the full URL in the stats.

Filtered tracking, showing the full hostname.

Google Developers : Tracking Multiple Domains
Google Analytics Support : Set up cross-domain tracking for multiple domains
funk.co.nz : How to show fully qualified URL in Analytics
netcel.com : 6 Must Have Google Analytics Filters

No comments:

Post a Comment

Allowed HTML tags:
<a href="">hyperlink</a>

Please, show the courtesy of identifying yourself when adding a comment. Anonymous comments will, most likely, be removed.