Skip to content

Google Tag Manager Variable Library

The complete, composable variable framework for Google Tag Manager. 250+ templates, organized across 14 functional categories, all sharing the same conventions, parameters, and chaining mechanism.

FeatureBenefit
Self-DocumentingStrict naming (e.g. extractNumber or toCamelCase). Your workspace becomes heavily organized code documentation.
True Low-CodePerform complex array logic and data extraction entirely through UI dropdowns without writing JavaScript.
Sandboxed & SecureVariables execute purely inside Google’s Custom Template APIs and never arbitrarily inject code into the DOM.
Data GovernanceClean and strictly validate all data shapes before they are sent to your 3rd-party vendor tags.
AI-ReadyStandardized framework allows LLMs to safely generate configurations without hallucinating risky code.
Unlock New Use CasesBrowsing the 250+ templates will spark totally new ideas and tracking capabilities you didn’t know were possible!

1. Download

Select your container package β€” from core essentials to all 250+ variables.

2. Import

GTM Admin β†’ Import Container β†’ Merge. All variables appear instantly in your workspace.

3. Configure

Browse the library below, find your variable, configure via the template UI.

4. Deploy

Preview, verify, publish. Your data layer mapping works on the first try.

PackageDescriptionLink
Full LibraryAll 250+ variables as a single container JSONDownload
Core OnlyEssential framework variables onlyDownload
Individual TemplatesFind specific templates, read docs, and see examplesBrowse Library Below

Every variable in the library follows the same standardized interface:

Parameter / ResultPurpose
src
(e.g. β€œInput Value”)
The input data source to act on.
rp1 & rp2
(e.g. β€œMatch Value”)
Template-specific parameters (e.g. the specific name of a property to extract).
pre
(β€œInput Function”)
Optional formatting function to cast or manipulate src before template logic.
out
(β€œOutput Function”)
Optional formatting function applied to the transformed result.
OutputThe final derived value returned by the variable, ready for the next step in the chain!
  • Direct Mode β€” Returns the result immediately, to use like any other Google Tag Manager native variable.
  • Apply Mode β€” Returns a function that can be used in other framework variables to be applied to the source (src) or the output (out). Use for multi-step pipelines.