On this page
In plain English
Custom HTML tags are GTM's escape hatch. They let you add scripts for tools that don't have a tag template, or run small bits of JavaScript.
The trade-off is risk. Code in a Custom HTML tag can slow the page, break the site or collect data it shouldn't, and it skips the safeguards built into tag templates. Some organisations block Custom HTML tags altogether.
Before writing one, check whether a built-in tag type or a template from the Community Template Gallery already does the job.
Example
A small CRM gives you a tracking script with no GTM template. You paste it into a Custom HTML tag that fires on all pages, then check in Preview mode that it loads without errors in the browser console.
Official documentation
- Custom tags (opens in a new tab) Tag Manager Help
Last reviewed