Common uses for cross-domain tracking
When you set up cross-domain tracking, you can collect data from multiple websites into a single account property. This lets you see data from different sites in the same reporting view.
In some configurations, like with 3rd party shopping carts, this is ideal. In other configurations, however, we recommend that you set up multiple views: one view for all of the traffic collected in the cross-domain tracking setup, and a separate filtered views to display data only from each individual domain. This lets you analyze the traffic from all of the different domains together in one view, and use the other views to analyze data from each domain in a separate set of reports when necessary.In this article:
If you have multiple top-level domains, like www.example1.com and www.example2.com, you can set up cross-domain tracking to collect and send data from both domains to the same Analytics account property.
You can use cross-domain tracking to collect data from a primary domain, like www.example.com, and a subdomain, like www.subdomain.example.com, in a single Analytics account property.
3rd party shopping carts
If you use a 3rd party shopping cart, your traffic probably has to leave your domain to complete a purchase, but you can use cross-domain tracking to keep track of users as they go through the entire checkout process and move between your domain and the domain that hosts your shopping cart.
If you have content that displays on another domain through an iFrame or a similar technology, you can still collect data from that traffic with cross-domain tracking.
- Cross-Domain Tracking - Web Tracking (analytics.js developer documentation)
- Cross-domain tracking with Google Tag Manager