How-To: Add analytics tracking scripts/code to your Branding Template

You can include your analytics tracking script, such as Google Tag Manager, Facebook, Capture, or others, in your Slate branding template by going to the 'shared' folder in the File Editor. Find the main build.XSLT file of the branding template. 

Add Scripts/Code

1. Click on the /shared/build.XSLT to pop up the 'Edit File' view.

2. Find the <head> tag near the top of the file (highlighted in the sample screenshot)



3. Place your script above the closing </head> tag

In this example - Above line 20 (the contents inside the <head> will vary from template to template - concentrate on finding the closing tag).


4. Copy the code you received from the analytics installation instructions or your Marketing folks

Paste the full script into the file.

mceclip0.png Example Google Tag Manager (GTM/Gtag)

If you attempt to save this file, you will encounter a browser error stating something like "'src' is an unexpected token. The expected token is '='. Line 17, position 15.".

<script async="async" src=""></script>

5. Make the change as indicated below (using, of course, your own UA property ID).



The Slate-based file editor is expecting valid XHTML code. In this case, it is important to remember that in XHTML, attribute minimization is forbidden, and attribute values must always be quoted. 

See W3 Schools - HTML Versus XHTML for additional information.

6. Save the file (at the bottom of the pop-up window), and you are done. 



Was this article helpful?
6 out of 8 found this helpful