Google Tag Manager
Brightspot's Google Tag Manager integration allows you to quickly update tags on your site. After adding a code snippet to your Brightspot site, you are able to deploy analytics and measurement tag configurations from a web-based user interface.
To access Google Tag Manager code snippet:
- Login to your Google Tag Manager account at tagmanager.google.com. You see a list of available containers.
- Under the Container Name list, select the container from which you want to add the script. Google Tag Manager’s container dashboard appears.
- Under the Admin tab, click Install Google Tag Manager on the right. A page displaying JavaScript snippets appears.
- Copy the first JavaScript code snippet.
See the following generalized code snippet as an example of what to copy:
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-1234567');</script>
<!-- End Google Tag Manager -->
The following procedure describes how to add a Google Tag Manager script to your site's <head>
elements.
To add Google Tag Manager snippet to Brightspot site:
- Click > Admin > Sites & Settings.
- In the Sites widget, select the site to which you want to add a Google Tag Manager container snippet.
- Under the Front-End tab, expand the Advanced cluster.
- Under Custom Scripts and Styles, click to add a custom head script.
- Enter an internal name for the custom head snippet.
- Under Request Matcher, configure the filters for deploying Google Tag Manager. (The default settings are optimized for most web sites.)TipThe default Request Matcher settings will apply to every page. To proceed with these settings applying to all pages on your site, refrain from making changes to this section.
- Under Elements, click and select Script Element.
- Enter an internal name for the script element.
- Under Type, select Inline.
- In theBody field, paste the JavaScript container snippet you copied from Google Tag Manager.
- Delete the
<script>
and</script>
tags. These tags are automatically included by Brightspot. - Click Save.
To verify that the Google Tag Manager snippet is included on Brightspot site:
- On one of the pages of your site for which you have configured Google Tag Manager, right-click the page and click View Source.
- Using the Find function (CMD-F on Mac; CTRL-F on PC), search for
gtm
and verify that the Google Tag Manager code is included on the page.
To validate that Google Tag Manager code is making a call to Google Tag Manager:
- On one of the pages of your site which includes the Google Tag Manager code, right-click the page and click Inspect.
- On the Google Developer Toolbar, click the Network tab.
- Refresh the page.
- In the Filter search bar, type
gtm
. - Verify that the script appears, that the call was made to Google Tag Manager, and verify the ID of the container that was called.
Google Tag Manager includes a number of public resources that are available to users, including demonstrations and conceptual guides. See the list below: