Skip to content

Track Adwords Conversions in WHMCS with Google Tag Manager

    As with all e-commerce, WHMCS platform users want to be able to measure the results of their Google Adwords campaigns through the use of the conversion pixel. Setting up the Google Adwords conversion pixel in your WHMCS will allow you to track the orders placed on Google Analytics E-commerce reports.

    Using the dataLayer data entered by the Google Analytics module for WHMCS, you can pass on the variables and order information provided by the module through the container entered in the order steps.

    Requirements

    To track Google Adwords conversions on WHMCS with Google Tag Manager you need to:

    Google Ads

    To get started, let’s create a conversion pixel for website in Google Ads. Go to the menu Tools > MEASUREMENT > Conversions.

    Select the website option.

    Fill in the fields to create the tag with the following values:

    • Conversion name: WHMCS Conversion
    • Category: Purchase/Sale
    • Value: Use different values for each conversion

    The remaining values can be left as is or filled in according to your needs.

    Select the Use Google Tag Manager option and follow the installation instructions.

    Google Tag Manager

    In order to trigger the Google Ads conversion tag, you will need to add some settings in the container beyond the default settings in the Google Analytics module for WHMCS. Follow the required settings in the Tag Manager below, they also include the instructions in creating the conversion tag in Google Adwords.

    Trigger

    To trigger the Google Ads conversion tag we will need to create a trigger for this. Access the Google Tag Manager in the Triggers option, click the New button. Choose the Custom Event option and configure as follows.

    • Trigger name: WHMCS Google Ads Conversion
    • Trigger type: Custom Event
    • Event name: purchase
    • This trigger fires on: Some Custom Events
      • Value: event equals purchase

    Variables

    In order to pass on some information from the existing tracking code in WHMCS, we will need to create two new custom variables in the Tag Manager in addition to the existing variables for the WHMCS module.

    currencyCode
    • Name: currencyCode
    • Variable Type: Data Layer Variable
    • Data Layer Variable Name: ecommerce.currencyCode
    purchaseId
    • Name: purchaseId
    • Variable Type: Data Layer Variable
    • Data Layer Variable Name: ecommerce.purchase.actionField.id

    Now we will configure the tag with this information.

    Tag

    Add a new Google Ads Conversion Tracking tag in the container.

    Configure the tag with the variables and trigger that you created before.

    • Tag name: WHMCS Google Conversion Tag
    • Tag Type: Google Ads Conversion Tracking
    • Conversion ID: your ads conversion id
    • Conversion Label: your ads conversion label
    • Conversion Value: {{value}}
    • order ID: {{purchaseId}}
    • Currency Code: {{currencyCode}}

    Save the tag, now we just need to ensure that the linker tag is also set to finish.

    Configuring the Conversion Linker Tag

    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.

    To set up a conversion linker tag:

    • Click Tags and then New.
    • Click Tag Configuration and select Conversion Linker.
    • Select a trigger. In most cases, you should use a trigger that fires on all page views, or on specific page views where site visitors will land after an ad is clicked.
    • Save and publish your tag configuration.

    From now on you’ll see the sales conversions made on WHMCS from your Google Ads campaigns!

    Back To Top