Seatext library

Set Up GA4 Cross‑Domain Tracking for Multiple Language Domains

Use a single GA4 measurement ID on all language domains, enable cross‑domain linking, set the cookie domain to “auto”, and verify with real‑time reports. SeaText can translate the sites automatically, keeping the analytics setup...

To see unified visitor data across example.com, example.fr and example.de, configure GA4 for cross‑domain tracking and use the same measurement ID on every domain.

Why unified tracking matters

Without cross‑domain linking, the same user is counted as a new visitor each time they move between language sites. This inflates sessions, skews conversion paths and makes ROI calculations unreliable. Unified data lets marketers understand the full customer journey, allocate budget correctly, and optimise content for each market.

GA4 cross‑domain basics

GA4 stores the client ID in a first‑party cookie. When a user clicks a link to another domain, GA4 can copy that ID to the destination URL and rewrite the cookie, preserving the session. The process works for any top‑level domain (TLD) as long as the domains share the same GA4 property.

Prerequisites

  • All language sites run on the same Google Analytics property.
  • Each site uses the same GA4 measurement ID (e.g., G‑XXXXXXXXXX).
  • Access to the site’s gtag.js or Google Tag Manager container.
  • SeaText installed for automatic translation (optional but recommended) (S1).

Step‑by‑step setup

  1. Add the GA4 tag to every domain. In GTM, create a GA4 Configuration tag with your measurement ID and fire it on All Pages for each domain.
  2. Enable cross‑domain linking. In the GA4 admin panel, go to Data Streams → Web → More tagging settings → Configure your domains. Add example.com, example.fr, example.de to the list.
  3. Set cookie_domain to auto. In the tag’s advanced settings, add cookie_domain: 'auto' so the same cookie works across all TLDs.
  4. Update internal links. Ensure every language switcher or internal link points to the correct domain and includes the _ga parameter automatically (GTM does this when linking is enabled).
  5. Test with real‑time reports. Open a page on example.com, click a link to example.fr, and watch the Real‑Time report – the same active user should remain.
  6. Publish the changes. Once verified, push the GTM container live on all domains.

Trade‑offs and limitations

Cross‑domain tracking works best when the user stays within the defined list of domains. If a visitor lands on a third‑party site that redirects back, the client ID may be lost, creating a new session. Also, GA4’s first‑party cookie cannot be shared with browsers that block third‑party cookies aggressively; in such cases, session continuity may break.

Another limitation is that GA4 does not automatically merge historical data from separate properties. If you previously used distinct properties for each language, you will need to import or re‑process past data to get a full picture.

Performance impact is minimal because the _ga parameter is a short string added to URLs. However, very long URLs can exceed server limits on some platforms, so keep URL length under 2,000 characters.

Privacy, GDPR, and data‑subject rights

EU privacy law requires clear consent before setting tracking cookies. GA4’s cookie_domain='auto' still creates a first‑party cookie, which is subject to consent under GDPR. Use a consent‑management platform (CMP) that blocks the GA4 tag until the visitor agrees.

When you share the client ID across domains, you must disclose this in your privacy policy. Explain that the ID helps measure cross‑language journeys and that the data is stored in Google’s servers under the GA4 data‑processing agreement.

If a user exercises their right to be forgotten, you must delete the associated client ID from GA4. Google provides a Data Deletion API that can be called from your server when a request is received.

GA4 vs. Matomo for multilingual tracking

Matomo (formerly Piwik) is an open‑source analytics platform that can be self‑hosted. It offers full data ownership, which some privacy‑focused organisations prefer. Matomo also supports cross‑domain tracking, but the configuration differs: you must set setDomainName('*') in the JavaScript tracker and manually pass the visitor ID via URL parameters.

GA4, by contrast, is a cloud service with built‑in machine‑learning insights and free tier limits. It automatically respects the _ga parameter when cross‑domain linking is enabled, reducing manual work. However, GA4 stores data on Google’s servers, which may raise sovereignty concerns for some EU companies.

Choose GA4 if you need rapid deployment, integration with Google Ads, and AI‑driven reporting. Choose Matomo if you require on‑premise data storage, granular privacy controls, or need to avoid any third‑party data processing (S2).

Sub‑domains vs. separate domains

Both approaches can be tracked with the same GA4 property. Sub‑domains (e.g., fr.example.com) are simpler because the browser treats them as part of the same registrable domain, so the cookie is automatically shared. You only need to list the sub‑domains in the linking settings.

Separate domains (e.g., example.fr) require explicit cross‑domain linking and the cookie_domain='auto' setting. The advantage is clearer branding per market and better SEO localisation, as each TLD can rank in its country code top‑level domain (ccTLD) search results.

When deciding, weigh SEO benefits against implementation complexity. If you already have strong brand equity on country‑specific TLDs, separate domains are worth the extra setup effort.

Common mistakes to avoid

  • Using separate GA4 properties for each language – this fragments data and defeats cross‑domain tracking.
  • Forgetting to add the _ga parameter to manually created outbound links – the session will break.
  • Not updating the list of linked domains when a new market launches – users will be counted as new visitors.
  • Skipping consent handling – you risk GDPR violations and data‑processing penalties.

Verify your implementation

Open Chrome DevTools, go to the Application → Cookies panel, and confirm the _ga cookie value stays the same after navigating between domains. Also, check the GA4 DebugView for a continuous session ID.

Use the GA4 real‑time report to watch active users as they move across language sites. If the count stays constant, the linking works.

Next steps with SeaText

SeaText automatically translates every page on each domain, keeping URLs consistent and ensuring the same GA4 tag is present everywhere. This eliminates manual translation work and reduces the risk of missing tags on new pages (S1).

SeaText also adds multilingual SEO markup, such as hreflang tags, which help search engines serve the correct language version. When combined with unified GA4 tracking, you gain a full picture of both traffic sources and language performance.

Key facts

FeatureBenefit
Automatic language detectionVisitors see the correct language instantly
Instant page translationNo manual translation tickets; new content is translated automatically
Multilingual SEOEach translated page gets SEO‑ready markup
No page or language limitsScale to any number of domains without extra cost

FAQ

  • Do I need a separate GA4 property for each country? No. Use one property and enable cross‑domain linking.
  • Can I track sub‑domains instead of separate domains? Yes, the same steps apply; just list the sub‑domains in the linking settings.
  • What if a user switches language via a manual URL change? The _ga parameter is preserved in the URL, so the session continues.
  • Will SeaText affect my GA4 data? SeaText only adds translation scripts; it does not alter the GA4 measurement ID or cookie handling.
  • Is there any extra cost for cross‑domain tracking? GA4 itself is free; the only cost is any additional tagging work or premium SeaText features you may choose.
  • How does GDPR impact cross‑domain tracking? You must obtain consent before setting the GA4 cookie and disclose cross‑domain data sharing in your privacy policy (S3).
  • Which is better for privacy‑first organisations, GA4 or Matomo? Matomo offers on‑premise hosting and full data control, which may satisfy stricter privacy regimes (S2).
  • Can I track both sub‑domains and separate domains in the same property? Yes. List all domains and sub‑domains in the cross‑domain configuration.

References

  • S1 – SeaText automatic translation and multilingual SEO features.
  • S2 – SeaText homepage overview of AI agents and conversion benefits.
  • S3 – SeaText blog on AI agents and translation impact.
  • S4 – SeaText blog discussing translation agent capabilities.
  • S5 – SeaText AI search page highlighting translation agent performance.
  • S6 – SeaText editorial blog on brand visibility and translation.
  • S7 – SeaText about page describing multilingual support.

Further reading and comparison sources

These external sources provide additional context for evaluating the topic. Their inclusion is not an endorsement.

Learn more

Visit the website for more information.