Skip to main content

Google Tag Manager

Google Tag Manager (GTM) is a tag management system that lets you deploy and manage third-party scripts—such as analytics trackers, advertising pixels, and conversion tags—without modifying your site's source code directly. When you configure the Brightspot GTM integration, Brightspot injects the GTM container snippet into every page it renders, making all tags in that container available on your site.

You configure this integration at the Global level or the site level. Global configurations are inherited by all sites; site-level configurations override Global configurations.

Prerequisites

Before configuring this integration in Brightspot, you need the following from your Google Tag Manager account:

  • Container ID — A string in the format GTM-XXXXXXX, visible on the GTM workspace dashboard. Every container has a unique ID.
  • Auth token (optional) — Required only if you want to load a specific GTM environment (for example, a staging environment) rather than the default published container. Obtain this token from Admin > Environments in the GTM console.

For instructions on creating a GTM container, see Add a new container in Google's documentation.

Configuration

To configure the Google Tag Manager integration:

  1. From your Google Tag Manager console, copy the container ID and, if needed, the auth token for your target environment.
  2. Click > Admin > Sites & Settings > Sites > Global.
  3. From the Front-End tab, expand the Tag Manager cluster.
  4. Under Tag Manager, click Google Tag Manager.
  5. Complete the fields described in the following table.
  6. Click Save.
FieldDescription
Container IDEnter the GTM container ID (for example, GTM-XXXXXXX). Brightspot includes this ID in the GTM snippet injected on every rendered page.
Enabled in PreviewsToggle on to include the GTM snippet on Brightspot preview pages. Toggle off to exclude GTM from previews, which prevents test data from appearing in your analytics or ad platforms.
Environments tab
Auth TokenEnter the auth token for the GTM environment you want to load. Leave blank to load the default published container. For details on GTM environments and auth tokens, see Tag Manager Environments.
Preview EnvironmentEnter the name of the GTM environment to load in preview mode. GTM loads this environment's container version rather than the published version, so changes under test remain invisible to site visitors.
Use Environment Set in CookieToggle on to force GTM to read the target environment from a cookie set by the GTM console rather than from the Preview Environment field. Use this when the GTM console's preview mode is active.
note

The GTM snippet is supported on Brightspot pages that have scripting disabled.

Verifying that the GTM snippet is present

After saving the configuration, confirm that Brightspot is injecting the GTM snippet into your published pages.

tip

Clear your browser cache before testing, or append any query string (for example, ?nocache=1) to the URL to bypass cached responses.

To verify that the GTM snippet is present on a page:

  1. Navigate to a published page on your site.
  2. Right-click anywhere on the page and select View Page Source.
  3. Open your browser's Find function (Ctrl+F on Windows/Linux / ⌘+F on Mac).
  4. Search for gtm.js.

The GTM container snippet appears near the top of the <head> element. If no result is found, confirm that the Container ID field is populated and that the configuration has been saved.

Validating that the snippet is calling Google Tag Manager

Confirming the snippet is present in the source code does not guarantee that the browser is successfully loading the GTM container. Use the browser's network panel to verify the outbound request.

note

The following procedure uses Google Chrome DevTools. Other Chromium-based browsers have an equivalent network panel.

To validate that the snippet is making a call to Google Tag Manager:

  1. Navigate to a published page on your site that includes the GTM snippet.
  2. Right-click the page and select Inspect to open Chrome DevTools.
  3. Click the Network tab.
  4. Reload the page (Ctrl+R on Windows/Linux / ⌘+R on Mac) so that DevTools captures all network requests.
  5. In the filter bar above the request list, type gtm.
  6. Locate the request to www.googletagmanager.com/gtm.js.

A status code of 200 confirms that the browser loaded the GTM container successfully. Verify that the request URL includes your container ID (for example, ?id=GTM-XXXXXXX). If the request does not appear, the GTM snippet may not be present on the page—follow the verification steps above.

Additional resources

The following Google resources provide guidance on using Google Tag Manager:

Was this page helpful?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.