Free Google Tag Manager Custom Templates to Save you time and simplify your tracking setups

Here is a list of FREE Google Tag Manager (GTM) custom templates developed by the DumbData Measurement Resource Hub to help address various data collection challenges.

We currently offer 35+ templates for both Web and Server GTM containers, with several already Google-approved and available in the Template Gallery Community Listings.

The IP Transformer/Anonymizer

Anonymize IPv4/IPv6 addresses with multiple methods including removing octets, hexets for IPV6, redacting, or replacing with a static IP.

Country ISO Code and Name Converter

A GTM variable template that converts country names to Alpha-2/Alpha-3 codes and vice versa, with advanced options for handling invalid or unrecognized input.

US State Code and Name Converter

A Google Tag Manager (GTM) variable template that simplifies converting a U.S. state name to its corresponding abbreviation and vice versa.

Microsoft Clarity Playback URL

A WEB Google Tag Manager (GTM) custom variable template that helps retrieve the URL for Microsoft Clarity session playback recordings for that user’s session.

Basic Bot Traffic Identifier

Labels potential bot traffic as ‘potential_bot_visitor’ and non-bot traffic as ‘real_website_visitor.’ By default, bot traffic detection is enabled. You can customize this with your own rules.

Variable Coalesce

A Google Tag Manager custom variable template that mimics the behavior of a coalesce function commonly used in programming. This variable checks a sequence of variables and returns the first valid value, supporting skip values and a fallback mechanism.

Currency Value Formatter/Splitter

Google Tag Manager (GTM) custom variable template helps format and clean currency values. It removes specified currency symbols and codes, with support for custom symbols and delimiters.

Advanced Traffic Labeling Rule GTM Variable

Google Tag Manager (GTM) custom variable template helps flexible traffic segmentation based on various rules, including domains, cookies, storage, query parameters, custom variables, dataLayer, IP address, etc. This template helps distinguish internal vs. external traffic based on user-defined rules.

GTM Item Array Transformation

This variable template is designed to help you easily transform any array of objects (such as Google Analytics items array) by remapping attribute keys to a new format, providing you with enhanced flexibility, security, and functionality.

Event/Pageview Cookie Counter

to count and track user interactions, such as pageviews, product page views within a session or across visits. It checks if a cookie exists, increments its value if found, or creates it if missing. Optionally, it pushes an event to the Data Layer upon execution.

Array Attribute Transformer

A GTM variable custom template that extracts values from a specified attribute key in an array of objects and transforms them into an array of strings, integers, or numbers.

FullStory Session Recording URL

Get the FullStory session recording URL for the current user’s session. This URL can be sent anywhere.

Mouseflow Session Playback URL

This Google Tag Manager (GTM) variable template generates a Mouseflow session recording playback URL. The URL takes users directly to the session recording of a specific user’s session in Mouseflow

Fullstory Advanced Unofficial

An unofficial Google Tag Manager custom tag template for FullStory. This template enables event tracking, user identification, setting user properties, and setting page properties seamlessly within GTM.

Mouseflow Advance Unofficial

An unofficial GTM tag template for Mouseflow that can help with implementing Mouseflow tracking, such as applying tags, user identification, setting custom variables (with session scoping capability), tracking custom user friction, 404 errors, and measuring form interactions (submit, success, failure). It also supports installing the Mouseflow script.

Siteimprove Analytics Unofficial

An unofficial GTM tag template for Siteimprove that can be used to implement Siteimprove, including installing the script, executing events, and tracking pseudo page load event (virtual page views).

Smartlook Advanced Unofficial

An unofficial GTM tag template for Smartlook that can be used to implement Smartlook event tracking, identify users, set global event properties, trigger virtual page views, and track custom errors.

PostHog Utilities

Google Tag Manager Variable Template for retrieving PostHog session replay URL and session ID of a user’s current session.

Microsoft Clarity Utility

This GTM Microsoft Clarity utility variable retrieves the Clarity session replay URL, session ID, or user ID for the current user session.

Osano CMP Consent State

Use the template with the Osano CMP to detect an individual user’s consent state and configure when tags should execute. Useful for implementing basic or advanced consent mode, especially when Osano is installed directly on your website and not through GTM.

CookieFirst CMP Consent State

You can use this template with the CookieFirst CMP to detect an individual user’s consent state and control tag execution in GTM. Useful for implementing consent-aware tagging when CookieYes is installed directly on your website.

CookieYes CMP Consent State

You can use this template with the CookieYes CMP to detect an individual user’s consent state and control tag execution in GTM. Useful for implementing consent-aware tagging when CookieYes is installed directly on your website.

Termly CMP Consent State

You can use this unofficial Termly CMP template with the Termly CMP to detect an individual user’s consent state and control tag firing in GTM. Ideal for enabling consent-aware tagging when Termly is installed directly on your website.

Ketch CMP Consent State

Use this unofficial Ketch CMP variable template with the Ketch CMP to retrieve an individual user’s consent preferences and control GTM tag behavior. Ideal for setups where Ketch is installed directly on your website.

Iubenda CMP Consent State

Google Tag Manager custom variable template that detects Iubenda consent states using purpose ID and regional fallbacks, with customizable output formatting.

ConsentMo CMP Consent State

Google Tag Manager variable template to evaluate ConsentMo CMP consent state. Helps support Consent Mode setup and conditional tag firing based on user consent without native GTM integration.

ConsentManager.net CMP Consent State

A Google Tag Manager custom variable template to retrieve consent state data from the ConsentManager.net CMP. Supports fetching all or specific purpose consents and allows optional output transformation.

🌶️ We're cooking something spicy for you 😎 .

Before you leave, try out these free tools.
FREE GA4 AUDIT TOOL & UTM AUDIT TOOL