Google Tag Manager’s preview mode allows you to browse a site on which your container code is implemented as if the current container draft was deployed.
In addition to using GTM Preview mode for debugging your GTM configuration here are two other quick tips to help you validate your configuration or assist you in testing your site more effectively.
To make sure that you aren’t accidentally putting unnecessary console logs in your production environments you can add this conditional logic around your code.
This is useful for being able to check what values are in the dataLayer on a site without having to dig through the dataLayer object each time to find the event you want to view.
Check out our other Quick Tip about Google Tag Manager