How to Set Up Cross-Domain Tracking for Shopify

By Duncan from MultiPixels| July 15, 2025

Abstract cyberpunk data visualization background with glowing neon graphs, bar charts, and dotted lines representing cross-domain tracking and analytics in Shopify and Google Analytics 4

What is cross-domain tracking?

A technique used to identify and follow users as they move across multiple domains during their journey on your website or funnel is known as cross domain traffic. It's particularly useful for ecommerce settings such as Shopify, where user activity often spans different domains at one time, such as a marketing site, a main store or checkout system.

Most analytics platforms, such as Google Analytics 4 identifies users via browser cookies. It's these cookies that are tied to specific domains and can't be shared across websites due to browser security restrictions. This limitation creates a tracking gap and it's that once a user switches from store.com to checkout.com, they appear as a brand new visitor unless tracking is properly.

The way that cross domain tracking solves this issue is by passing user identifiers in the URL or through script linking. When done correctly, it allows you to accurately track customer journeys across websites, attribute your sales to the correct source, gain a deeper understanding into user behaviour and conversion flow, and avoid inflated session counts and false referrals.

By understanding and implementing this properly, your marketing will become more effective and you'll have better data integrity.

When do you need cross-domain tracking in Shopify?

Cross domain tracking isn't a necessity for every Shopify store, but if your setup involves more than one domain or even more than one sub domain, it likely will be. Here are some of the common scenarios that require it:

Shopify checkout domain

Shopify-hosted check out often exists on a different domain to your main store. This is the most frequent reason cross domain tracking is necessary. If users land on yourstore.com but complete their purchase on checkout.shopify.com, Google Analytics will record that as two separate sessions unless it's been properly configured.

External blogs or content hubs

Many merchants choose to host their blog or content on a platform like WordPress or another domain entirely. If users read a blog post typical to action and go to your Shopify store, you want this to be counted as a single session rather than two.

International stores or country-specific domains

If your store serves multiple regions and uses different domains for each of those regions, then cross domain tracking will allow you to track your users who never get between country specific sites.

Custom apps or portals

You use an external app for subscriptions, loyalty programs, or support in your business. If it's on a separate domain and you want to understand how users move between your store and the app, you'll need cross domain tracking to help.

Landing pages and funnels

Using tools such as ClickFunnels, Unbounce or WebFlow to build landing pages is great, but if those pages are hosted on domains like promo.yourbrand.com, users clicking through Shopify should be tracked as part of the same session without cross domain tracking. In these cases you'll see inflated user accounts, fragmented sessions, and incorrect traffic attribution.

How cross-domain tracking works

Technical level cross domain tracking involves the passing of user identifying data such as client ideas between websites. Since browser cookies are domain specific, this data has to be shared through alternate means. More often than not this is done by appending special URL parameters to outbound links.

Example flow:

  1. A user visits landing.yourstore.com.
  2. They click a CTA to visit yourstore.com.
  3. The link includes a parameter like _gl=... (used by GA4).
  4. The destination page extracts this parameter and ties it to the existing session.

Google Analytics 4 supports automatic cross domain tracking, while older analytics platforms like Universal Analytics required manual configuration. Google Tag Manager can facilitate this by enabling the linker functionality to decorate links automatically.

Important concepts:

  • Linker parameters: These are the special tracking codes (e.g., _gl) passed in URLs.
  • Session stitching: When tools recognize a user across domains and stitch their behavior into a single session.
  • Referral exclusion: Preventing the second domain from showing as a “referrer” in analytics reports.

Getting this setup correctly allows for seamless journey tracking—essential for accurate reporting and decision-making.

Setting up cross-domain tracking in GA4

Google Analytics 4 offers a relatively straightforward way to implement cross-domain tracking.

Step-by-Step setup via Admin:

  1. Log in to GA4 and go to Admin

    • Choose your Property and navigate to Data Streams.
    • Click into your Web Data Stream.
  2. Configure domains

    • Scroll down to Configure Tag Settings.
    • Click Configure your domains.
    • Add your domains under “Include domains that match” using “contains” or “equals” logic.
  3. Examples:

    • yourstore.com
    • checkout.shopify.com
    • blog.yourstore.com
  4. Save your changes

From this point, GA4 automatically adds the _gl parameter to outbound links pointing to the listed domains, enabling cross-domain session continuity.

Setting up Meta Pixel for cross-domain tracking

Unlike Google Analytics 4, Meta Pixel does not use linker parameters or session stitching in the same way. In fact, it relies on browser side tracking, persistent cookies and user login data to attribute activity across domains.

Steps for Meta Pixel tracking:

  1. Install the Pixel on all Domains

    • Ensure the same Pixel ID is installed on your Shopify store, checkout domain (if applicable), and any secondary sites like blogs or landing pages.
  2. Use the Facebook Channel App (for Shopify)

    • Shopify offers a native Facebook integration that correctly installs the Pixel on product, cart, and checkout pages.
  3. Track events on each domain

    • Events like ViewContent, AddToCart, and Purchase must be consistently implemented.
    • Use standard naming conventions to keep attribution clean.
  4. Verify domains in Business Manager

    • Verifying each domain ensures you have control over event attribution and helps avoid signal loss due to iOS or browser privacy changes.

As long as Meta’s Pixel is deployed consistently, conversions should be accurately tracked, even when users navigate between domains.

Cross-domain tracking with TikTok and other Pixels

Platforms like TikTok, Snapchat, and Pinterest use pixels similar to Meta’s. Their approach to tracking is largely cookie-based and doesn't require URL linkers, but there are still a few best practices to follow.

Best practices:

  • Install the Pixel on all sites

    • Consistent pixel deployment across all domains ensures unified tracking.
  • Use standardized events

    • Make sure events (like “AddToCart” or “Subscribe”) are structured the same way on each site.
  • Verify via browser extensions

    • Tools like TikTok Pixel Helper or Pinterest Tag Helper can confirm correct firing and detect issues.
  • Link accounts where possible

    • Some platforms allow for consolidated tracking when different sites are linked through your business account.

Even though the setup may be less technical than GA4, proper testing is essential to avoid gaps in attribution.

Testing and debugging your setup

Here’s how to ensure your tracking is working properly:

For GA4:

  • Watch for the _gl parameter. Navigate from one domain to another and check if the URL includes _gl=.... If it's missing, your cross-domain linking isn’t working.
  • Use GA DebugView. DebugView helps you monitor events in real time and verify whether a session remains consistent across domains.
  • Check session ID continuity. Your session should not reset between domains if tracking is configured properly.
  • Monitor source/medium. If the second domain appears as a referrer, GA4 is treating it as a new session. Fix your cross-domain settings.

For Meta and TikTok Pixels:

  • Use Pixel Helper tools. These browser extensions show whether the pixel fires correctly and if the events are recognized.
  • Review conversion paths. In your ad manager, analyze the customer journey. Look for multi-touch paths that cross domains.
  • Test across devices. Always test on mobile and desktop, and check incognito mode to simulate new users.

SEO & analytics considerations

When using cross-domain tracking, keep these points in mind:

  • Avoid duplicate content: Tracking parameters like _gl can create duplicate URLs. Use canonical tags to point to the base version.
  • Block tracking parameters from indexing: Instruct search engines not to index URLs with query parameters to avoid bloated crawl budgets.
  • Cookie consent: Make sure your cookie banners are synced across domains and comply with GDPR/CCPA.
  • Data cleanliness: Be cautious about link shorteners, redirect tools, or server configurations that might strip tracking parameters.
  • Use UTM parameters wisely: If you're passing users between domains via ads or email campaigns, use UTM tags carefully to avoid confusing or resetting source attribution.

Common mistakes to avoid

When setting up cross domain tracking for Shopify, even small missteps can result in broken data, incorrect attribution, or fragmented customer journeys. Some of the most common mistakes merchants in some markets make are listed below:

Forgetting to include all relevant domains

It’s a common oversight, but failing to list every domain that a user may pass through in your cross domain tracking configuration is a problem in analytics. You must explicitly add each domain to the cross domain list under the right tag settings. Even if you forget just one domain, you risk breaking the user journey at that point. You can avoid this by taking inventory of all the web properties involved in your customer experience and verify them.

Using different GA4 measurement IDs across domains

The common mistake is accidentally setting up different GA 4 measurement IDs across domains instead of using a single shared property. This breaks session continuity as GA 4 sees each idea as a completely separate entity. As a result, users won't be tracked across domains even with linker parameters in place.The correct approach is to use the same measurement idea across your entire cross domain setup.

Failing to enable the linker in Google Tag Manager

If you're using Google Tag Manager to manage Google Analytics for, you must explicitly enable the linker feature to pass session information between domains. Forgetting this step means that the necessary parameters won't be appended to the outbound links, and GA 4 won't be able to associate sessions across domains correctly.

Stripping or losing URL parameters through redirects

Setups or third party tools strip tracking parameters from URLs using redirects. This disrupts the ability of the system to track users across domains. Even server side redirects or link tracking services can unintentionally wipe out these parameters. You can prevent this by ensuring that your web server, CMS or app maintains the full URL.

Inconsistent or incomplete Pixel placement

With Meta Pixel, TikTok Pixel and other third party tracking scripts, failing to install the same pixel idea across all domains leads to incomplete event tracking. For example, if you only have the meta pixel on your main store but not on your checkout or landing page, conversions won't be attributed correctly.

Overlooking cookie consent and privacy tools

Regulations like GDPR, and CCPA mean that many Shopify stores use cookie consent banners. However, these tools only often apply to the main domain. If your cross domain setup includes blog, checkout page or app, or worse, none at all, tracking could be blocked or inconsistent.

Ignoring mobile and cross-device behavior

There are plenty of stores that test tracking only on desktop devices, and that's a mistake because it won't always work the same on mobile. Unfortunately, mobile browsers handle cookies and redirects very differently, and some features such as link decoration behave very consistently. If your users switch devices or browse on mobile before completing a purchase on desktop, your tracking needs to account for this. Always test cross domain flows on mobile devices and under different browser environments.

Allowing internal domains to show as referral traffic

A telltale sign of broken cross domain tracking is seeing your own domains sharp as referrals in your Google Analytics for reports. If checkout Shopify com appears as a traffic source, for example for purchases, it means the session was broken during the domain transition. This not only inflates referral traffic, but can also disrupt source attribution, crediting the conversion to your own domain instead of the original advert, e-mail or search source.

Overcomplicating the setup with redundant tools

Sometimes, in an effort to gain more control, users combine multiple tracking systems like GA4 via Shopify settings, GA4 via GTM, and additional third-party plugins. This redundancy can lead to double-counted events, conflicting data, and confusing reports. It’s better to choose a single method of implementation for each analytics tool and keep your configuration streamlined.

Not testing thoroughly before going live

Perhaps the most dangerous mistake is assuming that cross-domain tracking is working without testing it. Even when you follow setup instructions correctly, it's crucial to test the behavior end to end. This includes checking that the linker parameters appear in URLs, verifying that sessions are maintained, and confirming that source/medium data is accurate.

Cross-domain tracking is essential for a full-picture understanding of your customer journey. Whether your Shopify store interacts with a blog, third-party checkout, or external app, proper configuration of GA4, Meta Pixel, and other tracking tools ensures seamless analytics and accurate attribution.

Once set up correctly, cross-domain tracking provides cleaner insights, better marketing decisions, and more effective funnels that drive real results.

Are you ready to Grow your Business?

Get started