---
title: "How-To: Add GTM container script code to your Branding Template"
slug: "how-to-add-gtm-container-script-code-to-your-branding-template"
updated: 2026-03-03T23:05:15Z
published: 2026-03-03T23:05:15Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://knowledge.technolutions.net/llms.txt
> Use this file to discover all available pages before exploring further.

# How-To: Add GTM container script code to your Branding Template

This article explains how to include your GTM container script in your Slate branding template.

1. Select **Database** on the top navigation bar.
2. Select **Files.**
3. Go to the 'shared' folder in the File Editor. Find the main build.xslt file of the branding template.
4. Click on the /shared/build.xslt to access the 'Edit File' view.

![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/image-HX1HRIWZ.png)

1. Find the tag near the top of the file (highlighted in the sample screenshot) and place your GTM just above the closing tag. In the example below, this would be above line 20. Note that the contents inside the file will vary from template to template - just concentrate on finding the closing tag.

![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/image-5RQUXHMX.png)

1. Copy the code you received from the GTM installation instructions and paste the full script into the file.
2. Replace the “GTM-XXXXXX” with your Google Tag Manager container ID.

You will see something like this:

![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/image-DBA5M8XU.png)

Note the 'red' code highlight (in the example above on line 20) indicating that there is malformed code that cannot be successfully parsed. If you attempt to save this file, you will encounter a browser error stating something like "An error occurred while parsing EntityName. Line 20, position 42.".

The Slate-based file editor is expecting valid XHTML code. Some characters are reserved in HTML; the '&' character is one of them. Character entities are used to display reserved characters in HTML. In the original script '&' merely needs to be properly escaped using the proper HTML entity code '**&amp;**' . Once you type this into the file, the red markup will disappear:

![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/image-3U9JQKGJ.png)

1. Save the file (at the bottom of the pop-up window).
2. The next step will be to add the Google Tag Manager <noscript> HTML after the opening <body> tag: ![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/image-O7H438AN.png)
3. Save the changes

For more information on GTM and the default version of the script see: [https://developers.google.com/tag-manager/quickstart](https://developers.google.com/tag-manager/quickstart).
