Google Tag Manager
Inject your Google Tag Manager container script across all documentation pages with zero-code setup.
Google Tag Manager (GTM) lets you manage marketing tags, analytics snippets, and tracking pixels from a single container. Enable the GTM integration to inject your container script across all published documentation pages.
Prerequisites
-
A Google Tag Manager account with a container created
-
Your GTM container ID (starts with
GTM-) -
Publishing access to your documentation project
Configure from the Editor
Open Site Config
In the Editor, click Site Config in the top toolbar.
Navigate to Integrations
Select Integrations from the left sidebar.
Enable Google Tag Manager
Select Google Tag Manager and enter your GTM container ID.
Publish
Click Publish to deploy the integration to your live site.
Configure via documentation.json
Add the gtm key under integrations in your documentation.json:
{
"integrations": {
"gtm": {
"tagId": "GTM-XXXXXX"
}
}
}
| Property | Type | Required | Description |
|---|---|---|---|
tagId | string | Yes | Your GTM container ID (for example, GTM-XXXXXX) |
Where to find your container ID
-
Sign in to Google Tag Manager.
-
Go to Admin → Container Settings.
-
Copy the container ID displayed at the top (format:
GTM-XXXXXX).
What's next
-
Analytics and Chat Integrations — overview of all supported integrations
-
Google Analytics — track page views and events with GA4
-
Custom scripts — add scripts for tools not covered by built-in integrations
Last updated 1 day ago
Built with Documentation.AI