Skip to main content

Google Ads

WHMCS GTM does not talk to Google Ads directly. It publishes the same purchase in the data layer that Analytics receives, and the conversion is registered on the Ads side in one of two ways.

Option A: import the purchase from Analytics​

This is the shorter path and the one we recommend when the property already receives the purchase.

  1. In Google Analytics, open Admin → Key events and mark purchase as a key event.
  2. In Google Ads, open Goals → Conversions → New conversion action → Import → Google Analytics 4 properties, and select that key event.

The conversion keeps the value and currency sent by the module, follows the same attribution as the Analytics property, and needs no extra tag in the container.

Option B: Google Ads conversion tag in the container​

Use this when the conversion has to be counted by Ads alone, with its own attribution and bidding, or when the property does not receive the purchase.

The container template ships with Google Ads Conversion Tracking and Google Ads Remarketing tags, both paused. Before enabling them:

  • Replace AW-CONVERSION-ID in the conversion tag with your conversion ID, and MY_CONV_LABEL with the label Ads generated for that conversion.
  • Replace YOUR-CONVERSION-ID in the remarketing tag with the same conversion ID.

The conversion tag fires on purchase, takes the order id as transaction_id, the value from ecommerce.value and the currency from ecommerce.currency, so Ads discards a payment that arrives twice.

What the numbers mean​

The value on the purchase is the sum of the item prices, without tax, with tax in its own tax field. This follows the Analytics reference: value is price times quantity, and tax and shipping are reported separately. A store that includes tax in the total, as WHMCS does, would otherwise count the same money twice.

Values are floats with two decimals and quantities are integers. Analytics and Ads both reject strings in those fields, so the module normalises them before publishing.

Enhanced conversions​

The template's Ads tags use the User-Provided Data variable, which reads the hashed customer fields published by the module: email, phone, first name, last name and company, all SHA-256, plus country. Google accepts hashed values for enhanced conversions, and no plain personal data leaves the page.

If the module is configured not to publish customer data, the variable resolves empty and the tag still works, just without enhanced matching.

Refunds​

Refunds reach Analytics through the Measurement Protocol, not through the container. For Ads, the recommended path is importing the purchase from Analytics: the refund arrives as a correction on the same transaction id, and the conversion is adjusted without a second tag.