Skip to main content

Module Configuration

This tutorial will show you how to successfully configure Tag Manager & Enhanced eCommerce for WHMCS.

After install and activate the module, go to Addons -> Tag Manager & Enhanced Ecommerce. At module home you will se the two configurations that you need to provide. Please follow the steps below to properly configure the WHMCS plugin.

Google Analytics for WHMCS Tag Manager Configuration

Google Tag Manager Container ID

After module activation, you need configure the Google Tag Manager container ID. Your GTM container ID can be retrive from your Google Tag Manager account. If you do not have a GTM account or a container ID you need create it first. Please refer to this link to see how to create your container.

Insert your container ID (ex.: GTM-XXXXX) and save.

Insert your container ID (ex.: GTM-XXXXX) and save.


After configure your container ID, the Google Tag Manager snippet code will be inserted automatically in all your WHMCS pages. from now it is possible use all resources of your GTM in WHMCS.

To properly track enhanced ecommerce data you need to configure your GA Tracking ID. Please continue to the next step.

Google Analytics Tracking ID


This setting is only for anyone using the old Google Analytics (v3) property.

To get the most of Google Enhanced eCommerce tracking, you need to set the Google Analytics Tracking ID. Setting the tracking ID will permit the module to send eCommerce events directly from WHMCS back-end making possible track virtually any order made without bind this to the obligation to fire the javascript code from the client-side.

To configure Google Analytics version 3 property select from the dropdown menu Google Analytics UA (v3) and enter the property in the PROPERTY ID field.


If you deploy or configured the Google Analytics Settings variable on your GTM, please use the same Tracking ID as on your container. Using the same Tracking ID ensures consistence on the tracking funnel and conversions.


Important: using a diferent Tracking ID can break your reports.

From now, you have set up all configuration needed to ensure that WHMCS has your tracking info in all pages. The next step is to configure your container with some important information that will bind all the data needed in Enhanced eCommerce from your WHMCS.

Now your module is set up, go to the next steps to configure your GTM container and GA reports.

Google Analytics (v4) Measurement ID


This setting is only for Google Analytics 4 (GA4) property.

If you are using the new Google Analytics measurement property, also called Google Analytics 4, you will have some configuration differences compared to the old version. To configure the new one Google Analytics v4 measurement ID, select on the dropdown Google Analytics Version the option Google Analytics 4.


After selecting the Google Analytics 4 option, the fields MEASUREMENT ID and API SECRET will be displayed.


To configure the new Google Analytics 4 property, copy the measurement ID "G-" displayed in the web stream collection property details.


If you have difficulty finding the Measurement ID, see the official Google Analytics documentation 4 Find your "G-" ID (for any platform that accepts a "G-" ID).


The Google Analytics 4 The Measurement Protocol is a set of rules for collecting and sending events directly to Google Analytics servers. The Measurement Protocol lets you send data to Analytics from your WHMCS without user interaction from the front end. The Secret API is needed to send these offline hits from your WHMCS.

To create a new secret, navigate to: Admin -> Data Streams -> choose your stream -> Measurement Protocol API secrets -> Create.


If you already have an API secret, create a new one only for WHMCS. Click on Create button to generate a new and for better identification define a nickname like "WHMCS".


Paste your new API secret in module configuration.


Now save the settings clicking on the Save button.