Container Tags
Tags are segments of code provided by analytics, marketing, and support vendors to help you integrate their products into your websites or mobile apps. With Google Tag Manager for WHMCS, you no longer need to add these tags directly to your WHMCS. Instead, you configure and publish tags and how they fire from within the Google Tag Manager user interface.
Google Tag Manager natively supports many Google and 3rd party tag configurations. This tutorial will guide you to how to configure the tags needed to get the most of the Tag Manager & Enhanced eCommerce for WHMCS module.
Google Analytics 4 (GA4)
Google Analytics 4 properties bridge the gap between web and mobile analytics. Google Tag Manager for WHMCS supports Google Analytics 4 properties with two tags that work together:
caution
These configurations are valid only for Google Analytics v4 (GA4) Property.
Google Analytics: GA4 Configuration
The Google Analytics: GA4 Configuration tag initializes Google Analytics for your Google Analytics 4 property on a particular page. It handles behavior such as setting of Google Analytics cookies, sending automatic and enhanced measurement events, and declaration of common settings.
info
To properly track accesses and users on your WHMCS with the WHMCS GTM module you must trigger this tag on all pages.
To create a Google Analytics 4 Configuration tag:
- Click
Tags > New
. - Click
Tag Configuration
. - Select
Google Analytics: GA4 Configuration
. - Enter your measurement ID.
User Properties
Configure the custom user properties that's required for WHMCS GTM in User Properties.
Property Name | Value |
---|---|
template | {{template}} |
locale | {{locale}} |
language | {{language}} |
loggedin | {{loggedin}} |
userType | {{userType}} |
On Triggering
select All Pages
.
Google Analytics: GA4 Events
The Google Analytics 4 Event tag lets you send the events built by WHMCS GTM module to Analytics, in addition to the events that are sent automatically or through enhanced measurement.
To create a Google Analytics 4 Event tag:
- Click
Tags > New
. - Click
Tag Configuration
. - Select
Google Analytics: GA4 Event
. - For
Configuration Tag
, select the Configuration Tag you created earlier. - Configure each event described below.
WHMCS GA4 Ecommerce Tracking
WHMCS GA4 Ecommerce Tracking event sent the items (products/services) that user visit, add and remove from WHMCS cart and purchased. To configure this tag follow the information below.
- Tag Name:
WHMCS Ecommerce Tracking
- Tag Type: Google Analytics: GA4 Event
- Configuration Tag: select the Configuration Tag you created earlier.
- Event Name:
{{Event}}
- Event Parameters:
- Parameter Name:
items
- Value:
{{EcommerceItems}}
- Parameter Name:
- Triggering:
add_to_cart
remove_from_cart
view_cart
view_item
view_item_list
WHMCS GA4 Checkout
WHMCS GA4 Checkout event sent information about the checkout process of WHMCS to Google Analytics 4 property reports. To configure this tag follow the information below.
- Tag Name:
WHMCS Checkout
- Tag Type: Google Analytics: GA4 Event
- Configuration Tag: select the Configuration Tag you created earlier.
- Event Name:
{{Event}}
- Event Parameters:
Parameter Name | Value |
---|---|
value | {{value}} |
currency | {{currency}} |
items | {{EcommerceItems}} |
- Triggering:
begin_checkout
WHMCS GA4 Purchase
WHMCS GA4 Purchase event sent information about the purchase made on WHMCS to Google Analytics 4 property reports. To configure this tag follow the information below.
- Tag Name:
WHMCS Purchase
- Tag Type: Google Analytics: GA4 Event
- Configuration Tag: select the Configuration Tag you created earlier.
- Event Name:
{{Event}}
- Event Parameters:
Parameter Name | Value |
---|---|
transaction_id | {{transactionId}} |
currency | {{currency}} |
value | {{transactionValue}} |
tax | {{transactionTax}} |
coupon | {{transactionCoupon}} |
affiliation | {{transactionAffiliation}} |
items | {{EcommerceItems}} |
- Triggering:
purchase
Google Analytics 3
caution
These configurations are valid only for Google Analytics v3 Properties.
Google Analytics Universal Tracking Tag
Google Analytics tags can be configured within Google Tag Manager to have the same functionality as most manual code implementations. Configuration settings are found in the Google Analytics settings variable configuration.
To correctly associate visitors access with ecommerce and conversion tracking you need to deploy a Google Analytics Universal Tag to fire page view tracking for all visitors. To do so go to Tags options and click on New button. On Tag Configuration select the tag type Google Analytics: Universal Analytics.
On Track Type option the Page View will be selected by default, leave as is. Select your Google Analytics Settings created previously and on the Triggering select All Pages.
Save and publish the container.
info
If you already have implemented Google Analytics tracking code in your WHMCS, like the native GA module or manually coded, this tag can replace these implementations.
WHMCS Events Tracking Tag
To enable the Google Enhanced eCommerce data you need to create a tag to handle the data layer parameters to Google Analytics. This tag is responsible to track all ecommerce events occurred in WHMCS.
We will name this tag WHMCS Events Tracking to better understand and identification in your container. To create this tag go to Tags and click on the New button. Click Tag Configuration on the modal page and select the tag type Google Analytics: Universal Analytics.
Define the follow configuration parameters:
Name | Value | Description |
---|---|---|
Tag Name | WHMCS Events Tracking | the tag name. |
Track Type | Event | type of tag tracking. |
Category | {{eventCategory}} | data layer variable eventCategory. |
Action | {{eventType}} | data layer variable eventType. |
Label | {{eventLabel}} | data layer variable eventLabel. |
Value | {{value}} | data layer variable value. |
Non-Interaction Hit | False | non-interaction hit. |
Google Analytics Settings | {{google Analytics settings}} | your GA settings variable. |
triggering | WHMCS Events | the correspondent event previoulys create that will handle this tag. |
Google Ads Conversion Tracking Tag
Google Ads conversion tags help to build reports that show you what happens after a customer clicks on your ads โ whether they purchased a product, signed up for your newsletter, called your business, or downloaded your app. When a customer completes an action that you've defined as valuable, these customer actions are called conversions.
To set up Google Ads conversion measurement, you will need:
- Google Ads Conversion ID in hands.
- Google Ads Conversion Label in hands.
- Create a new tag of type Google Ads Conversion Tracking.
- Define the required variables.
- Set the trigger.
Create the Tracking Tag
In the Tag Manager go to Tags and click on New button. In the modal page click on Tag Configuration and select the option Google Ads Conversion Tracking. Configure the follow parameters.
Configure the Variables
Set up your variables on Google Ads Conversion Tracking tag based on your Google Analytics version. There two different sets, one for Google Analytics 4 (GA4) and other for Google Analytics 3.
Google Analytics 4 (GA4)
Variables for Google Ads Conversion Tracking based on Google Analytics 4 (GA4) configuration.
Name | Value | Description |
---|---|---|
Conversion ID | yourConversionIDCode | To find the Conversion ID, see Google Ads Conversion Tracking. |
Conversion Label | yourConversionLabel | To find the Conversion Label, see Google Ads Conversion Tracking. |
Conversion Value | {{value}} | data layer variable value created before. |
Transaction ID | {{transactionId}} | data layer variable purchaseId created before. |
Currency Code | {{currency}} | data layer variable currencyCode created before. |
Google Analytics 3
Variables for Google Ads Conversion Tracking based on Google Analytics 3 configuration.
Name | Value | Description |
---|---|---|
Conversion ID | yourConversionIDCode | To find the Conversion ID, see Google Ads Conversion Tracking. |
Conversion Label | yourConversionLabel | To find the Conversion Label, see Google Ads Conversion Tracking. |
Conversion Value | {{value}} | data layer variable value created before. |
Transaction ID | {{purchaseId}} | data layer variable purchaseId created before. |
Currency Code | {{currencyCode}} | data layer variable currencyCode created before. |
Trigger
On the Triggering section select the firing trigger WHMCS Google Ads Conversion created before.
Save the new tag and publish your container to make changes effect.
Google Ads Remarketing Tag
Remarketing helps you reach people who have previously visited your website or used your mobile app. Previous visitors or users can see your ads when they browse websites that are part of the Google Display Network, or when they search for terms related to your products or services on Google.
To enable this, create a new tag of type Google Ads Remarketing on the Tag options and set the follow parameters:
Name | Value | Description |
---|---|---|
Conversion ID | your conversion ID | the same conversion ID of your conversion tracking tag. |
Conversion Label | your conversion label | the same conversion label of your conversion tracking tag. |
Triggering | All Pages | select this tag to fire in all page views. |
Save and deploy your container to made changes effect.
Conversion Linker
Conversion linker tags are used to help tags measure click data so that conversions are measured effectively. Deploy a conversion linker tag on any page where visitors may land after they click an ad or promotion.
When people click on your ads, the URL of the conversion page on your website typically includes information about the click. When a site visitor takes an action that youโve tagged as a conversion (e.g. when a Google Ads conversion tag is fired), the click information is used to associate that conversion with the click that brought the visitors to your site.
The conversion linker tag automatically detects the ad click information in your conversion page URLs, and stores this information in first-party cookies on your domain for web pages, and passes the data in URLs for AMP pages. If you use a conversion linker tag with Google Marketing Platform products, the conversion linker tag may also store unique identifiers in those cookies.
To set up the conversion linker tag go to Tags and click on New button. Click Tag Configuration and select Conversion Linker. Configure the following parameters:
Name | Value |
---|---|
Tag Name | Conversion Linker |
Linker Options | Enable linking on all page URLs |
Triggering | All Pages |
Save the changes and publish your container to make changes effect.
After configure your Tag Manager container proceed to Google Analytics configuration to properly set your report information.