Skip to content
ADD-ONS

Multi Domains — Sharing an sGTM container across domains

Use one sGTM container for multiple domains. Ideal for multibrand stores and holding structures.

10 min Read Pokročilý Updated 5.6.2026

What is Multi Domains?

The Multi Domains add-on lets you share one server-side GTM container across multiple domains or subdomains. All domains send data to the same sGTM endpoint, which simplifies management and reduces costs.

Why use Multi Domains?

  • Multi-site e-commerce: One sGTM for all stores (cz, sk, de, etc.).
  • White-label SaaS: One sGTM for all customer subdomains.
  • Staging + Production: www.site.cz + staging.site.cz share an sGTM.
  • Cost savings: 1 sGTM container instead of 5 = 80% savings.

How to activate

  1. Go to Dashboard → Add-ons
  2. Turn on the "Multi Domains" toggle
  3. The power-up automatically enables cross-domain tracking
  4. Add all domains to Dashboard → Domains

Domain configuration

In Dashboard → Domains add all the domains that will use the same sGTM container:

Primary: track.site.cz → sGTM container GTM-XXXXXX
Additional:
  - www.site.cz → uses track.site.cz
  - www.site.sk → uses track.site.cz
  - staging.site.cz → uses track.site.cz

DNS configuration

All domains must have a CNAME record pointing to the primary tracking domain:

track.site.cz.     CNAME   sgtm.datanostro.com.
www.site.cz.       CNAME   track.site.cz.
www.site.sk.       CNAME   track.site.cz.
staging.site.cz.   CNAME   track.site.cz.

GTM Snippet on all domains

Each domain uses the same GTM snippet with a server_container_url pointing to the primary tracking domain:

<script>
(function(w,d,s,l,i){
  w[l]=w[l]||[];
  w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});
  var f=d.getElementsByTagName(s)[0],
      j=d.createElement(s),
      dl=l!='dataLayer'?'&l='+l:'';
  j.async=true;
  j.src='https://track.site.cz/gtm.js?id='+i+dl;
  f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXXXX');
</script>

Cookie sharing

For cross-domain cookie sharing set the cookie domain to the root domain:

// GTM server-side — Cookie Settings
cookie_domain: .site.cz  // Shared across www.site.cz, staging.site.cz, etc.
cookie_domain: .site.sk  // Shared for the SK domain

Benefits of Multi Domains

  • Centralized management: One GTM container for all domains.
  • Unified reporting: All data in one GA4 property.
  • Lower latency: One sGTM endpoint = fewer DNS lookups.
  • Cost-efficient: 1 sGTM container = 1 plan instead of N plans.

Limitations

  • Max 10 domains per sGTM container (PRO+ plan)
  • All domains must have the same owner (SSL certificate)
  • Cross-domain cookies require third-party cookie consent (GDPR)

💡 Use case: Multi-market e-commerce

A store with 5 locales (CZ, SK, PL, HU, RO) uses one sGTM container. All domains send data to one GA4 property, but with a custom dimension market for segmentation. Result: 80% savings on sGTM costs + unified reporting.

Did this article help you?
✓ Thank you for the feedback