Skip to article
On this page

GTM Custom Template tags: what a gallery template is

NyXi

NyXi

6 min read

Custom Template tags come from the Google Tag Manager community gallery. In the published container they show as an opaque internal name, which is why the vendor is not obvious.

If Tag Explorer showed you a card described as a Custom Template, the tag on your page came out of the Google Tag Manager community gallery. Somebody chose a vendor built template, filled in a few fields, and published it. No code was written on your side. Paste your page into Tag Explorer to see this tag on your own site.

The reason it needs explaining at all is that the published container does not carry the vendor’s name. A gallery template is stored under an internal function name like __cvt_MQDKZ that Tag Manager generates for your container, so from the outside the tag looks anonymous even though it is a perfectly ordinary, well behaved install.

What it actually does

Tag Manager has a small set of built in tag types for the major platforms. Beyond those, vendors can publish their own tag templates to a shared gallery, and you can add them to your container in a few clicks. A great many platforms are distributed this way, including Microsoft Clarity, TikTok and Reddit.

A template is not a snippet. The vendor writes it in a restricted version of JavaScript that Tag Manager runs in a sandbox, and the template must declare up front which capabilities it needs: which domains it may send data to, which cookies it may read or write, whether it may inject a script, and so on. Tag Manager shows those permissions when you add the template, and enforces them at run time.

For you, the practical difference is that the tag arrives with labelled settings instead of a wall of code. You fill in an account ID and a couple of options, and the vendor is responsible for what happens after that. Google documents the model in its custom templates reference.

Why it has no ID of its own

A Custom Template tag type is not a product, so it has no identifier attached to the type. The ID that matters belongs to the vendor inside it: a Clarity project ID, a TikTok pixel ID, whatever that platform uses. It sits in one of the template’s settings fields rather than in a standard place, which is why an anonymous looking template can still turn out to have a perfectly readable account number in it.

The __cvt_ name in the container is not an ID either. It is an internal label, unique to your container, and it will differ between two sites running the identical template. Copying it somewhere is not useful.

Should you trust it

A gallery template is third party code with a good safety model, not an absence of risk. Three things are worth checking before you rely on one.

Who wrote it. A template published by the vendor whose product it configures is a different proposition from one published by an unrelated individual. The gallery shows the author, and it shows whether the author’s identity was verified.

What it asked for. The permissions a template declares tell you what it can do. A tag that needs to contact one vendor domain and set one cookie is easy to reason about. One that asks for broad access to page content deserves a question.

Whether it is maintained. Templates can be abandoned. The version you published keeps working unchanged, which sounds reassuring and is actually the risk: it will not follow the vendor when they move an endpoint, change their consent handling, or fix a bug.

What this looks like in Tag Explorer

Tag Explorer draws your page as a tree. Each Tag Manager container is a branch, the tags inside it are leaves underneath, and anything hard coded into the page HTML sits under DIRECT ON PAGE.

Because the published container hides the vendor behind that internal name, the scan does not simply report “Custom Template” and give up. It fingerprints each template by its distinctive configuration parameters and by the vendor code that travels with it in the container, so the common ones are named and coloured by category: Clarity as a heatmap and replay card, an advertising pixel as an advertising card. Where the template exposes an account ID, that ID becomes the card title with a copy button.

Where the template cannot be placed, the card shows the type as the title and no copy button, which is normal rather than a fault. The Details button is then the thing to open: it lists the template’s parameters, and the field names alone usually identify the vendor. Copy tree and Copy for AI lift the whole result out as text if you want to hand it to someone.

Every card carries an info icon with a short definition and the Learn more link that brought you here. Below the tree, the insights panel raises softer advisories such as split tracking and odd containers.

Two limits apply. The public container file never contains the human names you gave your tags, so the friendly label you typed in Tag Manager is not available to any scan. And the tool reads the published container only, so a template added in a workspace and never submitted will not appear. A scan proves a tag is installed, not that it fired: use Preview mode in Tag Manager to prove firing.

What to do if it is missing, duplicated or dead

Missing. If a vendor you pay for is absent from the scan, check three things in order: that the tag exists in the container, that its trigger covers the pages you expect, and that the container version was actually published. An unpublished template is invisible to your visitors and to any scan.

Duplicated. The usual pattern is a vendor installed twice by two different methods: once as a gallery template and once as a pasted Custom HTML snippet or a plugin. Both copies fire, so sessions and conversions inflate. When the same ID is found from two sources, Tag Explorer shows a duplicate banner and tints the affected cards red. Keep the template, remove the snippet.

Dead or stale. A template whose vendor you no longer use is dead weight on every page load, and one whose author stopped updating it can be worse than dead, because it keeps sending data using an approach the vendor has moved on from. Review your gallery templates on the same schedule as the rest of your tags, update the ones with newer versions, and remove the ones nobody can justify.

If your container has templates nobody can identify, run the page through Tag Explorer and open Details on each unnamed card. Sorting out an inherited container, keeping what earns its place and removing the rest, is part of our rebuilds and rescues work.

Frequently asked questions

What is the difference between a Custom Template and a Custom HTML tag?

A Custom Template is written by a vendor in a restricted version of JavaScript and runs in a sandbox, so it can only do what its declared permissions allow. A Custom HTML tag is free text with no restrictions at all. When both options exist for the same vendor, the template is the safer choice.

Why does my container show a name like __cvt_MQDKZ?

That is the internal function name Tag Manager generates for a gallery template when it publishes the container. It is unique to your container, so the same template produces a different name on a different site. It is not an error and it is not a tracking ID.

Are community gallery templates safe?

They are safer than pasted code because they run sandboxed and must declare the permissions they use, such as which domains they may contact and which cookies they may set. They are still third party code, so the question is whether you trust the author and whether the template is still maintained.

What happens if the template author abandons it?

Nothing breaks immediately. The published version keeps running exactly as it is, which is the risk: it will not follow the vendor when they change their endpoint or their consent handling, and it will not receive fixes. Tag Manager shows when a newer version of a gallery template is available, so check for updates as part of ordinary upkeep.

More articles