🎯 Overview
Cross Domain tracking happens when a merchant has presence in multiple countries, and uses different domains for each country/continent, to manage inventory, shipping & returns, and localization separately.
When the destination URL of an affiliate link is to a different domain based on end user’s location, this conversion tracking is called Cross Domain. For example, an affiliate link redirects to amazon.com, a user in Canada clicks on the affiliate link will gets redirected to amazon.ca. The ability to track conversion across different domains is what we want to explore in this document.
Note: I will use Shopify as ecommerce store of choice in this document.
🔧 Technical Details
How GRIN’s affiliate tracking works is that we generate tracking information in the redirect URL, then our Affiliate SDK and/or Pixel app takes the tracking info from URL, and store into cookies and local storage. The first step to troubleshoot for a client is to check whether any tracking info (eg: _gLink, _gToken, etc.) is set in the browser.
There are lots of different ways to set up for international markets. Below are a few ways that we know of:
One Shopify store, different markets and domains
Traditional Shopify Store
When the store is traditional Shopify store, i.e. Shopify controls both front end and back end, Shopify handles markets and location redirect automatically once setup.
In the above example, I set up www.tanamonproductions.com as main domain for Canadian store (primary), and www.grindev.io as Market domain for US. If a user in US clicks on www.tanamonproductions.com, they will be redirected to www.grindev.io
In this case, as long as the store has installed our Pixel app (whether the App pixel, or Custom Pixel), the cross domain conversion tracking is working properly during my testing. Shopify handles everything, everything works.
Headless Shopify Store
When a storefront is headless, that means the merchant has custom logic on location based redirect. Similar to setting up affiliate SDK in a headless store, it is up to the merchant to make sure each store page has our affiliate SDK script installed.
And of course, our pixel app should be installed on the Shopify admin to track conversions during checkout.
Traditional Shopify Store with Third Party Checkout
If a merchant is using Shopify store with third party checkout, but have not whitelabeled the checkout domain, this will cause store front being in a different domain from the checkout domain.
We have a help article on this: https://help.grin.co/docs/tracking-subscription-affiliate-conversions. The gist is that we need to add our affiliate SDK to the third party checkout app.
