All guides
How-to guideFind your server-side GTM domain

Find your server-side GTM domain

Server-side GTM loads from your own domain instead of Google's servers. To monitor it correctly in TagWatch, you need to provide that custom domain. This guide shows you how to find it in two minutes using your browser's built-in developer tools. The website scan finds server-side setups by itself, including loaders that encode their requests; this guide is for when you want to check by hand.

3 minutes·Works in Chrome, Firefox, Edge, and Safari
1

Open your website and launch DevTools

Go to any page on your website where GTM should be loading. Your homepage is usually a good starting point. Then open the browser developer tools:

Chrome / EdgeF12 or ⌘ Opt I (Mac) / Ctrl Shift I (Windows)
FirefoxF12 or ⌘ Opt I (Mac) / Ctrl Shift I (Windows)
Safari⌘ Opt I (enable DevTools first: Safari, Settings, Advanced)

You can also right-click anywhere on the page and choose Inspect.

2

Go to the Elements tab and search for the GTM script

Click the Elements tab in DevTools. Then use the search shortcut to find the GTM snippet inside the page HTML:

Chrome / Edge / FirefoxCtrl F / ⌘ F

In the search box that appears, type gtm.start. This is a unique string that appears in every GTM snippet.

yourshop.com
Elements
Console
Sources
Network
Performance
<head>
<meta charset="UTF-8">
<title>Your Shop</title>
<script>
(function(w,d,s,l){w[l]=w[l]||[];w[l].push({'gtm.start'...
</script>
</head>
🔍gtm.start1 of 1
3

Find the "j.src" line to get the GTM load URL

Inside the highlighted script block, look for the part that sets j.src=. The URL after it tells you whether you run standard or server-side GTM.

Standard GTM, loads from Google's servers
j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;

The domain is www.googletagmanager.com. This is standard client-side GTM. In TagWatch, create a GTM monitor without enabling the server-side option.

Server-side GTM, loads from your own domain
j.src='https://sgtm.yourcompany.com/script.js'+dl;

The domain is a custom subdomain. This is server-side GTM. Copy the full URL (e.g. https://sgtm.yourcompany.com). You will need it in TagWatch.

4

What the full script looks like: two real examples

This is how you tell the two apart when you see the full snippet in the Elements panel. The only difference is the URL inside j.src:

Standard GTM (Google's domain)

(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://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXXXX');

Server-side GTM (your own domain) ← the one you look for

(function(w,d,s,l){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://sgtm.yourcompany.com/script.js'+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer');

Common server-side domain patterns

The subdomain varies per company. Common patterns include:

sgtm.yourcompany.comgtm.yourcompany.comanalytics.yourcompany.comtracking.yourcompany.comtag.yourcompany.com
5

Let the scan pick it up, or add the URL yourself

Run the page scan in TagWatch. It reads server-side GTM behind the common loaders (Stape, Taggrs and friends) on its own, so in most setups the proposed GTM monitor already carries your server-side endpoint and there is nothing to add.

Runs your container behind a loader the scan does not recognise? Create the GTM monitor from the scan as usual, then open the pencil on the monitor row, tick Server-side container and paste in the URL you found in step 4.

Edit monitor

Google Tag Manager on yourshop.com

https://sgtm.yourcompany.com

The base URL of your server-side GTM container.

CancelSave changes

TagWatch will now send a request to your server-side container endpoint on every check. If the container stops responding due to a deployment issue, DNS problem, or misconfiguration, you get an alert immediately.

Tips

  • Cannot find the script? Try the Network tab instead

    Open DevTools → Network tab, reload the page, then filter by "script". Look for a request to a domain that is not googletagmanager.com. The request URL is your server-side endpoint.

  • The GTM snippet may be in a tag manager itself

    Some setups inject GTM via another tag. If you only see one script tag and it is standard GTM, check the GTM workspace for a tag that loads a secondary container.

  • Multiple containers are possible

    Some sites run both a standard GTM container and a server-side container. You can monitor each separately in TagWatch by creating one monitor per container.

  • Server-side GTM is not the same as server-side tagging in GA4

    GA4 also has a server-side measurement option with its own endpoint URL. If you use that, create a separate GTM monitor and select GA4 with server-side measurement enabled.

Ready to monitor your server-side GTM?

Start your 14-day free trial. No credit card required.

Start free trial →