Google Tag Manager can be used to manage tracking tags, pixels, and beacons on your Brandcast sites. If you have proprietary code snippets or integrations that are not yet offered by Brandcast, this is the best way to add them to your Brandcast sites safely. Think of Google Tag Manager as an administrative interface to set up and manage Google Analytics, or any other tracking apps which Google Tag Manager supports.
This article provides step-by-step instructions for provisioning Google Analytics via Tag Manager (since this is the most common tracking strategy.)
If you need help integrating other tracking apps into your Brandcast site, contact us for support, or refer to the support articles provided by Google Tag Manager.
First: Obtain Website Tracking ID from your Google Analytics account
- Login to your Google Analytics account. Click the gear “admin” button on the bottom of the left-side menu:
2. Select the website you want to track in the middle column, then click "Property Settings" for that website:
3. Within the Property Settings, locate the "Tracking ID" (number “UA – XXXXXXXXX-X"). This is the important piece of information you’ll need to enter later in Google Tag Manager.
Second: Configure Google Tag Manager
1. Login to Google Tag Manager. Click on “Create Account” and name it.
2. Next, you'll create a “container” which will hold all the tracking apps for a specific website. Give it a name, and select "Web":
Once you’ve created your container, you’ll be presented with the head and body code for your container, associated with a unique container ID (“GTM – XXXXXXX”).
(The code will remain fixed for that specific container and its associated website, even if you add additional tracking apps to the container later.)
Now that you have the head code, you can paste it into the Website Settings for your site. However, before leaving Google Tag Manager, we will first complete some additional necessary steps.
3. Exit the code window and click on "New Tag":
4. From New Tag Page, click on “Tag Configuration”, and choose your Tag Type.
For Google Analytics you should choose Universal Analytics. DO NOT SELECT CLASSIC GOOGLE ANALYTICS. (Universal Analytics is the more recent, updated version of Google Analytics.)
5. You will then be prompted for a Track Type. Select “Page View” and under Google Analytics Settings, the drop down menu should give you “New Variable” as an option. (Variables allow you to set certain filtering criteria for triggering data collection.)
You can override the requirement to create any variables by clicking the “Enable overriding settings in this tag” and you’ll be immediately prompted for yourTracking ID from Google Analytics.
6. If you don’t override the settings and do select “New Variable” as described above, then under “Variable Configuration”, enter your Tracking ID from Google Analytics, and click Save in the upper-right corner.
7. Once you click “Save’, you will be prompted to rename the variable as appropriate to the tag and your website.
8. Back on the Tag Page, in the Triggering section (at bottom), choose “All Pages”, and then Save via the button in the upper right corner.
9. Back at the Container “Workspace” page, on the right-hand side, you’ll see a box that indicates “Container Not Published”. To publish the Container, click on the “Submit” button in the upper right. (IMPORTANT: Your website won’t start tracking until you’ve “published”your Container!)
10. Enter a Version name and description (e.g. what Tags have been added for tracking, etc.) and then click “Publish”.
Step 3: Paste the container code into the Website Settings
If you did not copy the Tag Manager Code Snippet when it was first generated, it can always be found either by clicking the Container ID at the top of the Workspace page (“GTM - XXXXXX”), or clicking on “Admin” and then clicking on the “Install Google Tag Manager” gear in the center of the Admin page.
Copy the entire head code only (not the “body” code.)
Within Brandcast, open the Website Settings by clicking "Studio" -> "Website Settings" and selecting the "Google Tag Manager" tab within the pop-up dialog. Paste your code into this window.
Your Brandcast site should now be all set for tracking Google Analytics or whatever other tags have been enabled for this particular site in Google Tag Manager!
Tracking Anchor Links with Google Tag Manager
If your page relies on anchor links (within-page navigation) and you'd like to be able to track clicks on those links using Tag Manager, you can refer to this article for a step-by-step walkthrough of how to set up your tracking.