Skip to main content
All CollectionsConfigurations
Validate Google Tag Manager (GTM) Updates
Validate Google Tag Manager (GTM) Updates

Set up an ObservePoint audit or journey to validate changes in Google Tag Manager (GTM) using our file substitution feature.

Product Enablement avatar
Written by Product Enablement
Updated over a month ago

This guide will walk you through the process of setting up an ObservePoint audit or journey to validate changes in Google Tag Manager (GTM) using our file substitution feature. Follow the steps carefully, as indicated by the red-highlighted areas in the images.

Step 1: Open Google Tag Manager and Access the Environment

  1. Navigate to your Google Tag Manager account.

  2. Under the Admin tab, select Environments.

Step 2: Create the Development Environment

On the Environments page, click New to create a new environment. We called our new environment “Dev” but you can name it whatever you like.

Step 3: Copy the GTM Share Link

After creating the new environment you’ll need to get the share link for it. You won’t actually use this link, but you’ll need the query strings from it.

  1. Click Actions, then Share Link.

  2. Copy the part of the share link that starts with gtm_auth (2nd screenshot). This is the part that puts GTM into “dev” mode.

  3. Paste this into a note so you can use it in a later step.

Step 4: Create and Publish a GTM Version in the Dev Environment

  1. Make a change to your GTM setup (tags, triggers, variables, etc)

  2. Click Submit to create a new version of your GTM container.

  3. Select the Dev (or whatever you called it) environment to publish to.

This will publish any changes you made to the “dev” environment without affecting the production version.

Step 5: Add a New File Substitution Rule in ObservePoint

  1. Go to Configurations >> File Substitutions (1st screenshot).

  2. Click to Create New.

  3. In the File Substitution Config window, input the GTM container URLs. (2nd screenshot).

    1. Give it a useful name, something like GTM Dev/Prod Swap for observepoint.com.

    2. In the first URL field, enter the standard GTM script URL (i.e., the URL that you are replacing). It typically looks like this:
      https://www.googletagmanager.com/gtm.js?id=GTM-A12B3C4

    3. In the second Substitute File URL, you’ll need to create this URL by adding the query strings from Step 3. It will look like this:
      https://www.googletagmanager.com/gtm.js?id=GTM-K34G9P6&gtm_auth=ABC123456_DEF789&gtm_preview=env-120&gtm_cookies_win=x

Step 6: Add the File Substitution To an Audit or Journey

1. Open your ObservePoint audit and navigate to the **File Substitutions** configuration under the settings

Step 7: Run the Audit or Journey and Review Results in Reports

Did this answer your question?