How to Set Up Web Tag Monitoring for Developer Console

Learn how to configure your web tags to log error notices in your developer console.


Web Tag Monitoring can log an error in your Developer Console when an error linked to GTM is triggered on your site. This uses Google Tag Manager's native Debug Mode Variable, which will only log errors when not in Google Tag Manager's Preview Mode.

If you're using Elevar's pre-built web tags, you simply need to turn on the monitoring following these steps.

How To Turn On Web Tag Monitoring

Elevar's pre-built web tags are already wrapped in the error monitoring setup, but the monitoring is turned off by default. To turn on the monitoring, follow the below steps:

Step 1: Log Into Google Tag Manager

Google Tag Manager

Step 2: Navigate to the Elevar Monitoring Core Tag Tag

Navigate to Tags > Find and select the Elevar Monitoring Core Tag.

Step 3: Set Debug Mode Variable to true

Under Debug Mode Variable, set the input to "true". Note: you could also set the value to "1".

Be sure to save your changes!

Step 4: Publish Changes

Press Submit > then Publish!

Now, when you navigate your website, if an Elevar tag has an error, this will be logged in your Developer Console like the below.

How to Fix Broken Variables

This will vary depending on your unique configuration and frankly the change that may have impacted the data layer.

Here are common reasons why variables return empty data:

  • Casing issue with the dataLayer vs the variable in GTM. For example: visitorType is the variable name in GTM but VisitorType is in your dataLayer (notice the capital V difference). This will throw an error (and was previously an issue in one of our own containers!)
  • The tag with the variable triggers before the dataLayer is populated. For example lets say you set Facebook product detail view to be on a "Page View" trigger. Chances are the dataLayer is not populated until after the "Page View" trigger executes. So the variable is undefined.
  • Javascript error breaking dataLayer.
    • If you aren't using our sitewide JS error tracking container then be sure to import that to your GTM account to track these errors for you in Google Analytics.
  • DataLayer was removed from website
  • Conflicts with third party scripts or features
  • Product data doesn't exist for particular product (ex. no product type)

Have questions on your own variable errors? Let us know so we can help!