Before publishing a tag, you can check if it works correctly in debug mode. Debug mode loads your website with unpublished changes and lets you test how tags, triggers and variables function.
To use debug mode, follow these steps:
- Go to Menu > Tag Manager.
- Choose the site/app you want to work with. Use the site/app picker in the upper right corner.
- Click Debug.
Tip: To open debug mode, you can also add
?_stg_debugat the end of your website’s URL.
- Your website will open in a new tab in debug mode.
- (Optional) Turn on Prevent page reload. This will freeze the page and clicking on any element won’t open a new page.
Tip: This option is useful for checking form submissions and clicks on buttons and menu items.
- Perform the action you want to test and check if the tag fires. Example: click a sign-up button.
- You can also check what data is collected when the tag is fired. Go to Events log > stg.click (or other event) > Variables. Here you’ll see a list of all tracked variables.
- When you’re happy with how the tag works, go back to Tag Manager and click Publish.
Tip: Once you click Publish, Tag Manager will publish all changes to tags, triggers and variables. So before you make changes live, make sure everything is set up correctly.