GTM Container Template
The GTM Container Template is a pre-configured GTM container export that contains all the necessary tags, triggers, and variables to integrate your WHMCS with Google Tag Manager. Importing it lets you skip manual configuration and get tracking running in minutes.
Prerequisites
Before importing the template, make sure you have:
- The WHMCS GTM module installed and activated with your GTM Container ID configured. See Module Configuration.
- A Google Tag Manager account with a container already created for your WHMCS store.
- A Google Analytics 4 property with a Measurement ID and, optionally, a Measurement Protocol API Secret.
What's Included
The template ships with everything pre-configured and organized into folders for easy management:
- Tags — Ready-to-use tags for Google Analytics 4 (ecommerce and general events), Google Tag, Conversion Linker, and starter templates for Google Ads conversion tracking and remarketing.
- Triggers — Custom event triggers mapped to every WHMCS GTM data layer event, covering the full ecommerce funnel (view item, add to cart, begin checkout, purchase, and more), domain transfer and renewal, invoice view, and general engagement events (sign up, login, support tickets).
- Variables — A complete set of pre-built data layer variables organized by category: customer data, user session data, ecommerce payload, WHMCS page context, and Google configuration constants. Includes both plain and SHA-256 hashed variants of customer PII fields for use with Enhanced Conversions and CAPI integrations.
- User properties — The Google Tag Event Settings variable sends
language,logged_in,user_type,templateandcurrencyas Analytics user properties, read from the same values the module publishes. Attach it to the Google tag as it comes.
The Google Ads Conversion Tracking and Remarketing tags are included as ready-to-use templates but are paused by default. They will not fire until you enter your Google Ads Conversion ID / label and manually unpause them.
How to Import the GTM Container Template
Firstly, download the GTM Container Template from your product download area and extract the file to your local machine.
Importing the Container
Log in to your Google Tag Manager account, select your container, and click on the Admin tab.

In the Container section, click on Import Container.

Click on Choose Container File and select the GTM Container Template file.

Now, choose which workspace you want to import the container into.
- New: all imported tags, triggers, and variables will be added to a new workspace that will be created.
- Existing: imported data will be added to the selected workspace.
If you need to keep your workspace intact but want to test the GTM Container Template, select the New option. This will allow you to deploy the new workspace without impacting any tags you may already have in an existing workspace.
When importing your container, you will have the option to merge the imported content with the selected workspace, or overwrite the workspace entirely. Overwriting will remove all your existing tags, triggers, and variables in that workspace and replace them with the imported container.
If you import into an existing workspace, select the Merge option.

After checking the Merge option, you can set whether any conflicting tags, triggers, or variables should be overwritten. We recommend choosing the Overwrite option.
Now, review the imported container to ensure that all tags, triggers, and variables are correctly configured.

Finally, click on Confirm to import the GTM Container Template.
This template is built to minimize conflicts with your existing tags, triggers, and variables. However, we recommend that you review the imported container to ensure all configurations are correct before publishing.
After Importing — Required Configuration
After importing, there are two variables you must update before publishing:
Google Tag ID
This variable holds the Google Tag ID used by the Google Tag, Google Ads, and Conversion Linker tags. In the Variables section, search for Google Tag ID and update the value with your Google Tag ID.

Google Ads placeholders (optional)
If you are going to use the Ads tags, replace AW-CONVERSION-ID and MY_CONV_LABEL in the
conversion tag, and YOUR-CONVERSION-ID in the remarketing tag. Leaving the placeholders
in place is safe while the tags stay paused; an enabled tag with a placeholder does
nothing useful.
See Google Ads for the two ways to count the conversion.
GA4 Measurement ID
This variable holds the Measurement ID used by the GA4 event tags. In the Variables section, search for GA4 Measurement ID and update the value with your Measurement ID.

Use the same Measurement ID here as the one you configured in the module settings. Consistent IDs ensure that both client-side and server-side (Measurement Protocol) events are attributed to the same GA4 property.
After updating these variables, publish the workspace to activate tracking on your WHMCS store.
The template does not impose consent settings, because they depend on your CMP and on the
jurisdiction you sell to. If you run Consent Mode, open each Google tag and GA4 tag and set
the consent requirements there, and make sure your banner writes the default command
before the container loads and the update command when the visitor changes their choice.
The module appends to the data layer and never replaces the array, so a default set before
the container is preserved.
What's Next
- Tags — Learn how each tag is configured and how to customize them.
- Variables — Full reference of all data layer variables available.
- Facebook CAPI — Use the pre-built Customer Data variables to improve Facebook Event Match Quality.