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:

  1. Go to Menu > Tag Manager.
  2. Navigate to Tags.
  3. Click + Create new tag.
  4. Name the tag and select the Custom asynchronous tag template.
  5. In Tag HTML code, type your code.
  6. Custom asynchronous tag template in Tag Manager.

    Tip: If you want to execute JavaScript, you need to include <script> <script>.

    Tip: The HTML editor has a built-in linter and syntax. They help you debug the JavaScript code, and you don’t need to use external editors.

  7. In Tag HTML code, you can use variables. Both ready-made and custom variables are on the right-hand list.
  8. A variable will be dynamically exchanged to its actual value at any time your script is executed.

  9. 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.
  10. 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.
  11. By default, the Enable document.write is turned off. If your tag needs the document.write toggle this option.
  12. In Flight dates, set time during which you want to run the tag.
  13. In Tag triggers, click + New trigger or + Existing trigger to set up a trigger for your tag.
  14. Adjust trigger conditions.
  15. When you’re done, click Save for the trigger and click Save for the tag.
  16. Test your tag in debug mode.
  17. When you’re happy how the tag works, click Publish.
Was this article helpful?

Be the first to rate this article.

Technical Support

If you have any questions, drop us a line at

We’re happy to help!