{"componentChunkName":"component---src-templates-markdown-template-jsx","path":"/guides/analytics/analytics-deprecated/developer-docs/integrations/google-tag-manager/","result":{"data":{"pageMetadata":{"title":"Google Tag Manager","path":"/guides/analytics/analytics-deprecated/developer-docs/integrations/google-tag-manager/","sourceCode":null,"metadataParent":{"title":"Integrations","path":"/guides/analytics/analytics-deprecated/developer-docs/integrations/","sourceCode":null,"hasVersionPicker":null,"metadataChildren":[{"title":"Introduction","path":"/guides/analytics/analytics-deprecated/developer-docs/integrations/introduction/","order":4.1,"label":null},{"title":"Rudderstack","path":"/guides/analytics/analytics-deprecated/developer-docs/integrations/rudderstack/","order":4.4,"label":null},{"title":"Google Tag Manager","path":"/guides/analytics/analytics-deprecated/developer-docs/integrations/google-tag-manager/","order":4.6,"label":null},{"title":"Segment","path":"/guides/analytics/analytics-deprecated/developer-docs/integrations/segment/","order":4.8,"label":null}],"metadataParent":{"title":"Developer Docs","path":"/guides/analytics/analytics-deprecated/developer-docs/","metadataChildren":[{"title":"Introduction","path":"/guides/analytics/analytics-deprecated/developer-docs/introduction/","order":1,"label":null},{"title":"Integrations","path":"/guides/analytics/analytics-deprecated/developer-docs/integrations/","order":4,"label":null},{"title":"Data Warehouses and Data Lakes","path":"/guides/analytics/analytics-deprecated/developer-docs/data-warehouses-lakes/","order":5,"label":null},{"title":"APIs","path":"/guides/analytics/analytics-deprecated/developer-docs/apis/","order":6,"label":null},{"title":"SDKs","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/","order":6,"label":null},{"title":"Developer Basics","path":"/guides/analytics/analytics-deprecated/developer-docs/developer-basics/","order":7,"label":null}],"metadataParent":{"title":"Analytics (Deprecated)","path":"/guides/analytics/analytics-deprecated/","metadataChildren":[{"title":"Introduction","path":"/guides/analytics/analytics-deprecated/introduction/","order":1.1,"label":null},{"title":"Developer Docs","path":"/guides/analytics/analytics-deprecated/developer-docs/","order":4,"label":null},{"title":"Identity Providers","path":"/guides/analytics/analytics-deprecated/identity-providers/","order":null,"label":null},{"title":"Settings","path":"/guides/analytics/analytics-deprecated/settings/","order":null,"label":null}],"metadataParent":{"title":"Analytics","path":"/guides/analytics/","metadataChildren":[{"title":"Introduction","path":"/guides/analytics/introduction/","order":1,"label":null},{"title":"Core Analytics (Beta)","path":"/guides/analytics/core-analytics/","order":1.1,"label":null},{"title":"Analytics Free Trial","path":"/guides/analytics/analytics-free-trial/","order":2,"label":null},{"title":"Setup","path":"/guides/analytics/setup/","order":3,"label":null},{"title":"Settings","path":"/guides/analytics/settings/","order":4,"label":null},{"title":"Analytics Data Manager","path":"/guides/analytics/data-manager/","order":5,"label":null},{"title":"Analyses","path":"/guides/analytics/analyses/","order":6,"label":null},{"title":"Query Builder","path":"/guides/analytics/query-builder/","order":6,"label":null},{"title":"User Aliasing","path":"/guides/analytics/user-aliasing/","order":7,"label":null},{"title":"Dashboards","path":"/guides/analytics/dashboards/","order":8,"label":null},{"title":"Analytics Resources","path":"/guides/analytics/resources/","order":10,"label":null},{"title":"User Segments","path":"/guides/analytics/user-segments/","order":10,"label":null},{"title":"Tutorials","path":"/guides/analytics/tutorials/","order":11,"label":null},{"title":"APIs","path":"/guides/analytics/apis/","order":12,"label":null},{"title":"Analytics (Deprecated)","path":"/guides/analytics/analytics-deprecated/","order":13,"label":null}],"metadataParent":{"title":"Guides","path":"/guides/","metadataChildren":[{"title":"Platform Overview","path":"/guides/platform-overview/","order":0.5,"label":null},{"title":"Getting Started","path":"/guides/getting-started/","order":1,"label":null},{"title":"mParticle Agent","path":"/guides/mparticle-agent/","order":1.5,"label":null},{"title":"Oversight","path":"/guides/oversight/","order":2,"label":null},{"title":"Data Platform","path":"/guides/data-platform/","order":3,"label":null},{"title":"Data Warehouse","path":"/guides/data-warehouse/","order":4,"label":null},{"title":"Customer 360","path":"/guides/customer-360/","order":5,"label":null},{"title":"Analytics","path":"/guides/analytics/","order":6,"label":null},{"title":"Audiences","path":"/guides/audiences/","order":7,"label":null},{"title":"Settings","path":"/guides/settings/","order":8,"label":null},{"title":"Troubleshooting mParticle","path":"/guides/troubleshooting/","order":10,"label":null},{"title":"Default Service Limits","path":"/guides/default-service-limits/","order":11,"label":null},{"title":"Glossary","path":"/guides/glossary/","order":12,"label":null}]}}}}}},"markdownRemark":{"html":"<aside class=\"warning\">\n<strong>Analytics Sunset</strong><br />\nWe began sunsetting mParticle Analytics on October 1, 2026. As a result, the features and workflows described on this page may no longer be available. This documentation is retained for reference. If you have questions about how this change affects your account, contact your mParticle account representative.\n</aside>\n<aside>\nNote: The information in this section pertains to legacy Analytics customers only. mParticle customers should refer to the <a href=\"/developers/\">mParticle developer documentation</a> and establish their Analytics data connections using mParticle's SDKs, APIs, and integrations ecosystem. \n</aside>\n<p>Google Tag Manager (GTM) is an easy way to manage your website tags requiring no knowledge of coding. Using GTM, you can add or update your own tags for conversion tracking, site analytics, remarketing and more across websites and apps. GTM is highly scalable with the size of your business, implements extensive error checking, and facilitates collaboration across your team.</p>\n<p>If you currently aren’t using Google Tag Manager, and would like to learn more, visit Google Tag Manager’s website <a href=\"https://marketingplatform.google.com/about/tag-manager/\">here</a>.</p>\n<p>Please note that the Analytics template is only available for containers with Web, iOS, and Android target platforms.</p>\n<h3 id=\"instructions\" style=\"position:relative;\"><a href=\"#instructions\" aria-label=\"instructions permalink\" class=\"anchor before\"><svg width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"Icon/Link\" fill=\"#98A0A3\" fill-rule=\"nonzero\">\n                        <g id=\"link\">\n                            <path d=\"M9.5,12.4 C9.6,12.4 9.7,12.4 9.9,12.4 C9.8,12.5 9.8,12.5 9.7,12.6 L7.5,14.8 C5.8,16.5 3,16.5 1.3,14.8 C-0.4,13.1 -0.4,10.3 1.3,8.6 L3.5,6.4 C3.6,6.3 3.6,6.3 3.7,6.2 C5,5 6.9,4.8 8.4,5.5 C8.8,5.7 9.3,6 9.6,6.4 C10,6.7 10.2,7.2 10.5,7.6 C10.2,7.9 9.9,8 9.5,8 C9.4,8 9.2,8 9.1,7.9 C8.9,7.5 8.5,7.2 8.1,6.9 C7,6.2 5.5,6.4 4.5,7.3 L3.8,8 L2.3,9.5 C1.2,10.6 1.2,12.5 2.3,13.6 C3.4,14.7 5.3,14.7 6.4,13.6 L7.9,12.1 C8.4,12.3 8.9,12.4 9.5,12.4 Z M14.7,1.3 C13,-0.4 10.2,-0.4 8.5,1.3 L6.3,3.5 C6.2,3.6 6.2,3.6 6.1,3.7 C6.7,3.7 7.4,3.7 8,3.9 L9.5,2.4 C10.6,1.3 12.5,1.3 13.6,2.4 C14.7,3.5 14.7,5.4 13.6,6.5 L12.1,8 L11.4,8.7 C10.4,9.7 8.9,9.8 7.8,9.1 C7.4,8.9 7.1,8.5 6.8,8.1 C6.7,8.1 6.5,8 6.4,8 C6,8 5.6,8.2 5.4,8.4 C5.6,8.8 5.9,9.3 6.3,9.6 C6.6,10 7.1,10.2 7.5,10.5 C9,11.2 10.9,11 12.3,9.8 C12.4,9.7 12.4,9.7 12.5,9.6 L14.7,7.4 C16.4,5.7 16.4,3 14.7,1.3 Z\" id=\"Shape\"></path>\n                        </g>\n                    </g>\n                </g>\n            </svg></a>Instructions</h3>\n<ol>\n<li>In Analytics, click on <strong>Settings</strong> and select <strong>Data Sources</strong>.\n<img src=\"/images/guides/analytics-deprecated/integrations/analytics-settings-data-sources.png\" alt=\"Analytics settings data sources\"></li>\n<li>Click on <strong>New Data Source</strong>.\n<img src=\"/images/guides/analytics-deprecated/integrations/analytics-new-data-source.png\" alt=\"Analytics new data source\"></li>\n<li>Select the <strong>Google Tag Manager</strong> icon.\n<img src=\"/images/guides/analytics-deprecated/integrations/select-google-tag-manager-icon.png\" alt=\"Select Google Tag Manager icon\"></li>\n<li>You will need to use this <strong>API Key</strong> in step 9.\n<img src=\"/images/guides/analytics-deprecated/integrations/google-tag-manager-api-key.png\" alt=\"Google Tag Manager API key\"></li>\n<li>Navigate to your <a href=\"https://tagmanager.google.com/\">Google Tag Manager</a> console and select <strong>New Tag</strong> in the top left corner.\n<img src=\"/images/guides/analytics-deprecated/integrations/google-tag-manager-new-tag.png\" alt=\"Google Tag Manager new tag\"></li>\n<li>Click on <strong>Tag Configuration</strong>.\n<img src=\"/images/guides/analytics-deprecated/integrations/google-tag-manager-tag-configuration.png\" alt=\"Google Tag Manager tag configuration\"></li>\n<li>Click on <strong>Discover more tag types in the Community Template Gallery</strong>.\n<img src=\"/images/guides/analytics-deprecated/integrations/google-tag-manager-community-template-gallery.png\" alt=\"Google Tag Manager community template gallery\"></li>\n<li>Select the <a href=\"https://tagmanager.google.com/gallery/#/owners/Indicative/templates/Indicative-GTM-Template\"><strong>Indicative Analytics</strong> template</a>, and add it to your workspace.\n<img src=\"/images/guides/analytics-deprecated/integrations/indicative-analytics-template.png\" alt=\"Indicative Analytics template\"></li>\n<li>Once you have added the Indicative Analytics tag to your workspace, you’ll need to input your Analytics project’s API key from step 4 into the <strong>API Key</strong> field.\n<img src=\"/images/guides/analytics-deprecated/integrations/input-analytics-api-key.png\" alt=\"Input Analytics API key\"></li>\n<li>\n<p>Once you have inputted your Analytics API key, you must select your <strong>Tag Type</strong>. You have the option to select Initialization, Custom Event, Clear Stateful Properties, or Clear Unique ID. <strong>Please note:</strong> all selections initialize the SDK, and send the Page View event to Analytics.</p>\n<table>\n<thead>\n<tr>\n<th>Tag Type</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Initialization</td>\n<td>Initializes the SDK and sends the <em>Page View</em> event <strong>only</strong>.</td>\n</tr>\n<tr>\n<td>Custom Event</td>\n<td>Sends custom GTM events.</td>\n</tr>\n<tr>\n<td>Clear Stateful Properties</td>\n<td>Clear properties stored as a persistent cookie (e.g. at user logout).</td>\n</tr>\n<tr>\n<td>Clear Unique ID</td>\n<td>Clear the user ID stored as a persistent cookie (e.g. at user logout).</td>\n</tr>\n</tbody>\n</table>\n<ul>\n<li>If Custom Events is selected as your “Tag Type”, an additional field called “Event Name” will become available. This allows you to choose the Analytics event name from the available variables in GTM. Press the + on the right of the field to select a variable. “Event” is the recommended variable so Analytics event names match GTM custom event names.\n<img src=\"/images/guides/analytics-deprecated/integrations/custom-event-tag-type.png\" alt=\"Custom event tag type\">\n<img src=\"/images/guides/analytics-deprecated/integrations/select-variable-for-event-name.png\" alt=\"Select variable for event name\"></li>\n<li>\n<p>If Custom Events is selected as your “Tag Type”, you also have the option of adding Custom Properties. This allows you to choose the event’s property names and values from the available variables in GTM. Press the + on the right of the property field to select a variable. Variables can be either normal event properties, which add context to an event, or they can be stateful properties, which remain the same for a user until the property is cleared (see above).</p>\n<table>\n<thead>\n<tr>\n<th>Property Type</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Event Property</td>\n<td>Add context to an event, like device type or marketing channel.</td>\n</tr>\n<tr>\n<td>Stateful Property</td>\n<td>Event properties that remain the same for a user until the property is cleared.</td>\n</tr>\n</tbody>\n</table>\n<p><img src=\"/images/guides/analytics-deprecated/integrations/custom-properties-for-custom-events.png\" alt=\"Custom properties for custom events\">\n<img src=\"/images/guides/analytics-deprecated/integrations/select-variable-for-custom-properties.png\" alt=\"Select variable for custom properties\"></p>\n</li>\n</ul>\n</li>\n<li>You may then optionally choose to set a custom unique ID. This variable will be used as each user’s User ID within Analytics. You may then choose to set this ID as your alias. For more information on aliasing, see documentation <a href=\"https://support.mparticle.com/hc/en-us/articles/11368206339341-Aliasing\">here</a>.\n<img src=\"/images/guides/analytics-deprecated/integrations/set-custom-unique-id.png\" alt=\"Set custom unique ID\"></li>\n<li>Next, click on <strong>Main Configuration</strong> to configure your session and cookie settings. Here, you can choose to track sessions and set the timeout threshold for each session. The default defines sessions as being separated by 30 minutes of inactivity.\n<img src=\"/images/guides/analytics-deprecated/integrations/main-configuration-session-settings.png\" alt=\"Main configuration session settings\"></li>\n<li>Then you must configure your cookie settings. Analytics recommends that you write cookies on your <strong>Main Domain</strong> so that each subdomain on your website is tracked using the same cookie.\n<img src=\"/images/guides/analytics-deprecated/integrations/main-configuration-cookie-settings.png\" alt=\"Main configuration cookie settings\"></li>\n<li>More advanced Google Tag Manager users may choose to customize their Analytics-GTM integration further. In your Advanced Settings, you may set tag firing priorities, enable custom tag firing schedules, add tag metadata and more.</li>\n<li>\n<p>Once you have configured your tag, select specifically which events you wish to send to Analytics in the <strong>Triggering</strong> section.</p>\n<p><img src=\"/images/guides/analytics-deprecated/integrations/configure-tag-triggering-settings.png\" alt=\"Configure tag triggering settings\">\n<img src=\"/images/guides/analytics-deprecated/integrations/select-events-for-tag-triggering.png\" alt=\"Select events for tag triggering\"></p>\n</li>\n<li>Next, save the Indicative Analytics tag to your workspace by clicking <strong>Save</strong> in the upper right corner.\n<img src=\"/images/guides/analytics-deprecated/integrations/save-indicative-analytics-tag.png\" alt=\"Save Indicative Analytics tag\"></li>\n<li>Finally, in order to finish your Google Tag Manager integration, you must Submit your changes to your Workspace. Click on the <strong>Submit</strong> button in the upper right corner of your “Overview” page.\n<img src=\"/images/guides/analytics-deprecated/integrations/submit-gtm-changes.png\" alt=\"Submit GTM changes\"></li>\n</ol>","frontmatter":{"title":"Google Tag Manager","order":4.6,"seoTitle":null,"seoDescription":null},"parent":{"__typename":"File","modifiedTime":"October 12, 2026"}}},"pageContext":{"slug":"/guides/analytics/analytics-deprecated/developer-docs/integrations/google-tag-manager/"}},"staticQueryHashes":["2950460867"]}