Custom Templates for Google Tag Manager

One of my passion projects has been to create custom templates for Google Tag Manager’s community template gallery.

On this page, I’ll list all the custom templates I’ve created for the gallery, as well as provide a link to each template’s individual documentation page.

Do you need help with your template?

If you want to commission me for help building your custom template, please contact me at simo (at) simoahava.com.

Remember to also check out my articles on custom templates.

Client templates (0)

Tag templates (17)

Facebook Pixel

This is an unofficial template for the Facebook Pixel. You can use it to load the SDK, initiate the pixel(s), and to send custom and standard events to Facebook with any custom properties and user attributes you wish.

Simo Ahava

AudienceProject UserReport

This is an unofficial template for AudienceProject’s UserReport tag.

Simo Ahava

Consent Mode (Google tags)

This is a template for deploying Google tags’ Consent Mode functionality. It lets you deploy Consent Mode with both the “default” and “update” commands.

Simo Ahava

Adform Tracking Point

This is an unofficial template for the AdForm Tracking Point. You can use it to load the SDK, initiate the tracking point, and to send page- and order-level data to AdForm.

Simo Ahava

Userpilot

The is an unofficial template for Userpilot. The tag can be used to identify users (with an ID and associated properties), reload Userpilot and re-evaluate page state, track custom events, and trigger specific Userpilot content for the user, regardless of targeting conditions.

Simo Ahava

User Distributor

You can use this tag to randomly assign users to buckets, and then to store this information in a first-party cookie. This is useful for quick A/B tests and for creating samples or cohorts of your visitors.

Simo Ahava

Facebook Customer Chat

This is an unofficial template for the Facebook Customer Chat SDK. You can use it to load the chat SDK and to attach event handlers to the API events.

Simo Ahava

Snowplow Analytics

This is the official template for the Snowplow Analytics SDK. It supports the full spread of features for the JavaScript tracker, with a few exceptions due to the sandbox of custom templates.

Simo Ahava

IP Geolocation API

This is an unofficial template for the IP Geolocation API. With this API, you can query for geolocation data using the user’s (or a custom) IP address. This information is then written into dataLayer.

Simo Ahava

Persist Campaign Data

This tag stores the page referrer and URL parameters in a browser cookie. This cookie can be used, for example, on conversion pages or after the user has given consent to attribute the session to the correct campaign. The template also stores the original location of the page to overcome the rogue referral problem on single-page applications.

Simo Ahava

Qualaroo

This is an unofficial template for Qualaroo. You can use this template to initialize the Google Analytics integration, and you can use all of the available Qualaroo JavaScript APIs as well.

Simo Ahava

YouTube iframe API loader

The is an unofficial template for the YouTube Iframe API. A tag created with this template loads the YouTube Iframe API on the page. This is necessary if you want to track interactions in lazy-loaded or dynamically added videos with Google Tag Manager’s native YouTube video trigger.

Simo Ahava

CDNJS - Hosted Libraries

Use this template to load hosted libraries from the CDNJS content distribution network.

Simo Ahava

Google Tag Manager Monitor

Use this template to set up a monitoring system for Google Tag Manager. With the monitor, you can collect data about tags that fired (or did not fire) with any given event. This information can be used to proactively fix issues with your tags.

Simo Ahava

Adservice

This is an unofficial template for the AdService SDK.

Simo Ahava

AppNexus

This is an unofficial template for the AppNexus pixel.

Simo Ahava

Conductrics

This is an unofficial template for the Conductrics library. You can use it to load the SDK/API on your site.

Simo Ahava

Variable templates (5)

EEC Products -> GA4 Items

This variable templates takes an Enhanced Ecommerce products/impressions/promotions array as an input, and outputs it in the updated “items” format for Google Analytics 4 Ecommerce.

Simo Ahava

Snowplow Analytics Settings

This template is meant to be used with the Snowplow Analytics tag template. It generates a tracker configuration object for the tag, thus removing the need to configure the tracker manually for every single Snowplow Analytics tag in the container.

Simo Ahava

URL 2.0

This template can be used to replace the built-in URL variable type. It has additional options, such as building the string from different URL components, and for parsing the URL fragment for key-value parameters as well.

Simo Ahava

String from array of objects

This template takes an array of objects, and produces a string where the values of one of the given keys in these objects is concatenated into a single string.

Simo Ahava

Enhanced Ecommerce Object Builder

Use this template to build an Enhanced Ecommerce object, compatible with Universal Analytics. This way you do not necessarily have to use the dataLayer at all for populating Ecommerce data into Universal Analytics.

Simo Ahava