About cross-domain tracking

How standard tracking compares to cross-domain tracking

Cross-domain tracking makes it possible for Google Analytics to see sessions on two related sites (such as an e-commerce site and a separate shopping basket site) as a single session. This is sometimes called site linking.

In this article:

Standard tracking code behaviour

The standard Google Analytics tracking code records traffic to a given URL as a group. For example, if you set up tracking to your blog – myexampleblog.example.com – traffic to all pages and subdirectories to your site are collected and tallied as a unit. That way, when a user goes from one page on your site to another page on that same site, Google Analytics reports show the following relationships:

  • navigation path between pages
  • total time on site – as a cumulation of time on pages
  • number of individual sessions and unique sessions
  • number of unique users

In addition, Analytics treats traffic to separate URLs as unique and unrelated (except for referring links). This is how you would expect Analytics to work, since you would not want data from one website to appear in the Analytics report for a separate, unrelated website.

Two views used to collect data from two separate websites

Cross-domain tracking behaviour

Suppose that you have an online shop and a 3rd-party shopping basket hosted on another domain, such as:

  1. www.example-petstore.com
  2. www.example-commerce-host.com/example-petstore/

Without cross-domain tracking, a user who arrives to your online shop and then proceeds to your 3rd-party shopping basket is counted as two separate users, with two separate sessions of different durations.

Cross-domain tracking makes it possible for Google Analytics to see this as a single session by a single user. This is sometimes called site linking. A user to your online shop who proceeds to your shopping basket is counted as one user, instead of two users, and the session that they started on the shop site is continued through to the time spent on the shopping basket site.

 

One view used to collect data from two separate websites

Related Resources