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.

Overview

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:

Log Into Google Tag Manager:

Google Tag Manager

Locate the Elevar Monitoring Core Tag

  • Begin on your Google Tag Manager homepage and use the left-hand menu to click on the "Tags" tab.
  • Locate and click on the tag named "Elevar Monitoring Core Tag".

Edit Debug Mode Variable:

  • Once in the Elevar Monitoring Core Tag, navigate to the "Tag Configuration" section and click on the pencil icon to edit the tag.
  • Navigate to the "Debug Mode Variable" section and set the input to "true".
    • (See Figure 1)
  • Be sure to save your changes by clicking on the "Save" button in the upper right-hand corner of the page.

Step 1 screenshot

Figure 1

Publish Your Changes in GTM

  • Navigate to the Google Tag Manager homepage and click on the "Submit" button in the upper right-hand corner of the page.
  • An additional confirmation page will appear, click on the "Publish" button in the upper right-hand corner of the page.
    • (See Figure 2)

Step 3 screenshot

Figure 2

❗️

Note: Elevar Tag Error

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.

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!

Reach out to our support team to have them review your updates.