Troubleshooting

Overview

This article describes the troubleshooting found when working with Google Tag Manager and Google Analytics.

Environments

GTM script was defined on DEV environments, so according to the syndication process, all environments have GTM scrip implemented. It means, Google Analytics account was collecting data from all environments and the customer is only interested in collecting PROD data.

Solution.

  1. Navigate to Triggers section on GTM interface
  2. Click each one's name of the trigger.
  3. Click on Trigger Configuration to edit the trigger.
  4. Add new condition where Page Hostname equals host of your PROD environment. Example:

    Note

    Page Hostname is a built-in variable of GTM, if you need more information, please refer to the official Google Tag Manager documentation here.

  5. Click the Save button to save this new configuration
  6. Validate in preview mode in all environments and then, publish it.

Note

There is official documentation to work with environments on GTM, if you need more information, please refer here.