Server-side GTM (sGTM)
Provision a hosted sGTM container, configure its endpoint, and understand usage billing.
Last updated:
CookieBeam can provision a hosted sGTM container per banner. Browser events are sent to the container's measurement endpoint, and the container routes them to the server-side tags you configure.
Endpoint
The default endpoint is a CookieBeam-managed subdomain of syncingbeam.com. This is not first-party to your site.
To serve measurement traffic from your own domain, add a custom subdomain such as track.example.com under Custom Domain. Create the CNAME and TXT records shown in the dashboard, then use Check Verification. CookieBeam switches to the custom domain only after it verifies. Until then, traffic continues through the managed endpoint.
Consent behavior
The CookieBeam banner attaches Consent Mode v2 state (ad_storage, analytics_storage, ad_user_data, ad_personalization) to every hit sent to the server container.
Google tags (GA4, Google Ads, Floodlight) in the server container read consent state and adjust their behavior automatically. No additional setup is needed for these tags.
Meta CAPI tags generated by the template wizard check for ad_storage consent before firing.
When using another consent provider, the generated web container does not include Consent Mode defaults. Your CMP or a separate GTM tag must set them before tags fire.
Other server-side tags do not read consent state automatically. Configure each tag's triggers to check the incoming consent values. See Google's Consent Mode for server-side tagging for the format of the consent parameters (gcs, gcd) that arrive with each hit.
Destination support
The template wizard generates a web container and a server container for the destinations below. Only these destinations are generated. A platform that is not listed as supported has no tags in either download.
| Destination | Status | Where tags run | Events you can select |
|---|---|---|---|
| Google Analytics 4 | Supported | Web and server. Browser GA4 tags send hits to your server container URL; one server GA4 tag forwards them. | page_view, purchase, add_to_cart, begin_checkout, view_item |
| Meta (Pixel and Conversions API) | Supported | Web and server. The browser pixel and the Conversions API tag fire for the same event. | PageView, Purchase, AddToCart, InitiateCheckout, ViewContent |
| Google Ads | Supported | Server only. The web container transports the event to the server container. | purchase, add_to_cart, begin_checkout (each needs a conversion label) |
| Microsoft Ads, LinkedIn, Pinterest, Snapchat, Klaviyo, TikTok, Reddit | Not available | Not generated | None |
For every selected event, the web container also includes a Data Tag that sends the event, its consent state and an event ID to the server container.
- Meta deduplication. The browser pixel and the Data Tag read the same Unique Event ID variable, and the Conversions API tag sends that value as
event_id. Meta uses the matching IDs to count the browser and server event once. - Credentials. GA4 measurement IDs, Meta pixel IDs and Google Ads conversion IDs and labels are public identifiers. The Meta Conversions API token is a secret: the dashboard stores it encrypted, never shows it again after you save it, and writes it only into the server container download. The web container download never contains it.
- Consent. Consent state travels with each transported event. Google tags and the generated Meta CAPI tag act on it; any other server-side tag has to be configured to respect it. See Consent behavior.
A configuration saved before a destination was removed from the wizard (for example Microsoft Ads) keeps its old settings, but the downloads ignore them. The dashboard names each ignored destination above the download buttons. Saving the configuration again removes it.
Provision a container
- In the sidebar, open sGTM. The overview lists your containers and banners. Choose Enable sGTM on the banner you want. This provisions the container.
- Open the container and paste the Container Configuration (base64 string from GTM > Admin > Container Settings). Use Save config.
- Check the container status and server URL.
- Optionally, add and verify a custom domain (see Endpoint above). Use Check verification after creating the DNS records.
- Use Test Connection to confirm the container is running. Then send a test event from your site and check that the server-side tag receives the expected consent fields.
Container provisioning and domain verification happen through the sGTM controls, not through the banner publish flow.
Template wizard
The GTM Templates card on the container page generates ready-to-import GTM containers for common destinations. It appears only on containers linked to a banner; a standalone container has no template download.
Use Configure Destinations to pick your destinations, then download the Web Container and Server Container files. The supported destinations are:
- GA4 — page views and standard events
- Meta Conversions API — with
ad_storageconsent gating - Google Ads — conversion and remarketing events
When CookieBeam is selected as the consent provider, the generated web container includes the CookieBeam Consent Mode tag. The generated server containers arrive with consent signals wired in. Import the downloads into GTM and add your credentials.
API tokens (such as the Meta CAPI token) are stored with AES-256-GCM encryption and are never exposed to the browser.
Usage tiers and billing
Only GET and POST requests that return a 2xx response count toward a container's request limit. Health probes, CORS preflights and error responses are not counted.
sGTM has request-volume tiers. A team's first container has a 14-day grace period before billing starts; each additional container is billed from activation, prorated onto the subscription. Current tier prices and limits are shown before enablement.
With Auto tier upgrades enabled, usage above the current limit moves the container to the required higher tier. For a team with a Stripe subscription, the service then synchronizes that tier to Stripe. A failed Stripe synchronization attempts to restore the previous database tier and reports an error. With automatic upgrades disabled, the current check returns without upgrading, suspending, billing an overage, or sending a warning.
At a successful subscription-cycle invoice, CookieBeam resets the request counter and moves each container to the lowest tier that covers the usage the closing cycle recorded. A container that served 3.2 million requests starts the new cycle on Business, not Pro. The team is then synchronized to Stripe. If that synchronization fails, the reset stands and the daily billing reconciliation repairs the Stripe side, so for a short time the dashboard tier can differ from the tier Stripe bills.
What counts as a request
The billed unit is one HTTP request to your tagging endpoint (the default subdomain or a verified custom domain). The same rule applies on cluster and VM-hosted nodes.
- Counted: GET or POST requests that the tagging container answers with a 2xx status.
- Not counted: CORS preflight (OPTIONS) and HEAD requests; requests the container answers with a non-2xx status, such as errors or paths no client claims; requests rejected by the per-client rate limit (429); preview (debug) host traffic; and the health and infrastructure paths
/healthz,/favicon.ico,/robots.txt,/.well-known/and/_cookiebeam/.
A request isn't an event. A request that carries several events counts once, and a script download counts as one request. On VM-hosted nodes, counts are added when the usage sync runs, so the dashboard figure can trail live traffic.
Billing period and the usage estimate
The counter covers the current billing period of the subscription that pays for sGTM: the standalone sGTM subscription, or the team subscription when sGTM is billed with it. Period boundaries are stored in UTC and shown in your local time. The counter resets when the renewal invoice is paid, so it starts slightly after the period boundary.
The container's Usage card separates what was counted from an estimate. The estimate is a straight line from this period's average rate to the period end, rounded to two significant figures and never lower than the count so far. It isn't shown in the first three days of a period, below 1,000 counted requests, before a billing period is known, or while the counter still waits for its reset. It doesn't predict traffic spikes or campaigns, and it isn't an invoice.
The card also states what happens at the tier limit. With auto-upgrade on, the container moves to a higher tier. With auto-upgrade off, the tier doesn't change during the period. At the cycle reset it moves to the tier that covers the closing cycle's usage. Use the tier control to move it sooner. The card shows the date of the last tier raise in the current period.
Limits
- Up to 50 containers per team.
- sGTM requires an active trial or paid CookieBeam subscription. Starting a trial requires a payment method on file.