Skip to main content

Integrations

Google Tag Manager

Wire Google Tag Manager into every docs page — add your container id to `integrations.gtm` and the script loads on next deploy.

Container-level tag management — ship ads pixels, A/B tools, third-party scripts via GTM without a config redeploy.

Configure

integrations.gtmstringpathrequired

Google Tag Manager Container ID. Script injects via <Script strategy="afterInteractive"> and loads from https://www.googletagmanager.com.

{
  "integrations": {
    "gtm": "GTM-XXXXXXX"
  }
}

Where to find your container id

Tag Manager → workspace name top-left → Container ID (GTM-XXXXXXX).

Or set it from the dashboard — Editor → Configurations → AI & Advanced → Integrations.

Gotchas

  • If you also configure ga4, make sure you aren't tracking twice (GTM container triggering a GA4 tag while ga4 is separately set).

Loading behavior

  • Strategy: afterInteractive — injected after page interactivity, so it never blocks first paint.

  • CSP: if you enforce a Content Security Policy, allowlist https://www.googletagmanager.com in script-src.

  • Removal: delete the integrations.gtm key (or blank it in the dashboard) and redeploy — the script disappears on the next page load.

Related

Was this page helpful?

Last updated August 7, 2026