Before you publish any tag, you can check if it works correctly in debug mode. The debug mode will load your website with unpublished changes and you will be able to test how tags, triggers, and variables work.
To use debug mode, follow these steps:
- Go to Menu > Tag Manager.
- From the website picker, choose a website or app you want to work with.
- In the top-right corner click Debug.
Tip: To open debug mode, you can also add
?_stg_debug
at the end of your website’s URL. - Your website will open in a new tab with debug mode running.
- Optionally, toggle Prevent page reload. This will freeze the page, and when you click any element it won’t open a new page.
Tip: This option is useful for checking form submissions and button and menu-item clicks.
- Perform an action which you want to test and see if the tag was fired. For example, click a button.
- You can also check what data is collected when the tag is fired. In the debug mode, navigate to Events Log > stg.click (or other action) >
Name of your tag
> Variables. Here you will see a list of all variables that are tracked for this tag.
- When you’re satisfied with how the tag works, go back to Tag Manager and click Publish.
Tip: When you click Publish, Tag Manager will publish all changes in tags, triggers, and variables. So make sure that everything is set up well before you make changes live.
Tip: In addition to our debug mode, you can also use the following debugging tools: