Custom asynchronous tag template
The custom asynchronous tag template lets you insert custom scripts to your website’s code. In Tag Manager, you can set it up in a hassle-free way.
To set up a custom asynchronous tag, follow these steps:
- Go to Menu > Tag Manager.
- Navigate to Tags.
- Click + Create new tag.
- Name the tag and select the Custom asynchronous tag template.
- In Tag HTML code, type your code.
- In Tag HTML code, you can use variables. Both ready-made and custom variables are on the right-hand list.
- In Advanced tag settings, set the tag type. By default, it’s set to be displayed to visitors who consent to Does Not Require Consent, but you can change it to a different type.
- By default, the Respect visitor privacy is turned on. Leave it as is, if you want to respect visitors who set a do-not-track option in their browser.
- By default, the Enable document.write is turned off. If your tag needs the
document.writetoggle this option.
- In Flight dates, set time during which you want to run the tag.
- In Tag triggers, click + New trigger or + Existing trigger to set up a trigger for your tag.
- Adjust trigger conditions.
- When you’re done, click Save for the trigger and click Save for the tag.
- Test your tag in debug mode.
- When you’re happy how the tag works, click Publish.
A variable will be dynamically exchanged to its actual value at any time your script is executed.