Skip to main content
Mintlify

Search documentation

Type to search this documentation.

On this pageOverview

Google Tag Manager

Integrate Google Tag Manager with your Mintlify documentation to manage analytics tags, conversion tracking, and marketing events centrally.

Add your tag ID to your docs.json file and Mintlify injects the Google Tag Manager script into all your pages.

Your tag ID is the container ID displayed in your Google Tag Manager workspace, formatted as GTM-XXXXXXX.

You are responsible for setting up cookie consent banners with Google Tag Manager if you need them.

After publishing your changes, use Google Tag Manager's preview mode to confirm that your container loads on your docs site.

Analytics
"integrations": {
    "gtm": {
        "tagId": "required"
    }
}
Example
"integrations": {
    "gtm": {
        "tagId": "GTM-MGBL4PW"
    }
}
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu