Implementing Cross-Domain Tracking in Shopify

With the help of this guide, configuring cross-domain tracking is pretty much as easy as counting 1-2-3.

According to Google, Cross-domain tracking makes it possible for Analytics to see sessions on two related sites (such as an eCommerce site and a separate shopping cart site) as a single session. This is sometimes called site linking (google, 2020).


In ShopifyThere are two ways to implement cross-domain tracking in Shopify
If you are using Native Shopify GA Integration, then you can just add the following to the Additional Google Analytics JavaScript in store:
ga('require', 'linker');

ga('linker:autoLink', ['']);

domain one

And the following in the store:
ga('require', 'linker');

ga('linker:autoLink', ['']);

domain two


If you are using GTM, you will just need your Google Analytics Settings variable to have the following settings below:

That's it!


Remember, for the cross-domain tracking to work for both cases, both domains need to be tracked in the same GA property. And you will also need to add both domains to the referral exclusion list of the property.

referral exclusion

Note: Make sure to replace the domains in our example above into your own domains.

Hope this helps! 😀👍


Back to Top! 🔝