Skip to main content

4.6

This page details the changes and new features introduced in Google Tag Manager for WHMCS version 4.6.X.

4.6.0​

  • Release date: pending

Changed​

  • A purchase is reported when the invoice is paid. The event used to fire when the cart was submitted, which counted orders that were never paid. It now comes from the payment itself, with the amount actually received, and it no longer depends on the customer returning to the invoice.
  • The data layer appends instead of replacing. A consent banner default written before the container loads is no longer erased by the module's own array assignment.
  • Customer data leaves the data layer hashed. Enhanced tracking publishes SHA-256 hashes of email, phone and company instead of the plain values, and no longer publishes names or addresses.

Added​

  • revenue_type on every purchase: new, renewal, upgrade or addon, classified from the invoice lines.
  • refund events when an order is cancelled and refunded, carrying the original transaction_id and items, so Analytics subtracts the money that came back.
  • Coupon on the purchase when the order used a promo code.
  • Delivery ledger. Every revenue event is claimed in mod_whmcsgtm_revenue_log before being sent, so a retried callback, a duplicated hook or a page refresh cannot report the same sale twice.
  • Purchase Reporting page in the documentation, covering the delivery paths and how to investigate a missing sale.
  • User properties in a shape Analytics reads. The payload now carries a user_properties object with currency, language, user type, logged in and template, for the container's Google Tag Event Settings to publish.
  • Domain and invoice events carry data. domainTransfer and domainRenew publish the domains with their prices, and invoice_view identifies the invoice, its status and its total.

Fixed​

  • Currency on the purchase. The invoice lookup returns no currency, so sales were being sent without it. Google accepts that request and discards the event, which made paid invoices disappear from Analytics without any error.
  • Transaction identity. transaction_id is the order id again, the identifier the module has always used, falling back to the invoice number and then to the invoice id.
  • Item identity. Invoice lines resolve back to the product id, so item reports keep the history they already had.
  • Partial payments and duplicate hooks no longer report the same invoice twice.
  • Currency is no longer published as false. A strict comparison between the client currency (string) and the currency table id (integer) sent currency: false on lists and items, which makes Google drop the event.
  • Product price follows the billing cycle on the page. A product at 25 per month was being reported at 250, the yearly price, because the module picked the cheapest price per day instead of the cycle being displayed.
  • Types are consistent across the funnel. value and price are floats, quantity is an integer, and empty coupon, promotion and hash fields are no longer sent as null or "".
  • begin_checkout fires once per cart state. Reloading the cart no longer sends another checkout event; changing the cart does.
  • sign_up carries method, and login, sign up and ticket events carry eventType alongside the legacy event_type.
  • purchase value excludes tax. The amount received included tax and the tax was also sent as tax, so the same money was counted twice in revenue.

Fixed in 4.6.2​

  • Product list prices on WHMCS 8.x. Some stores return the catalog minimum price as 0.00 with an empty cycle, and every item on the list was published with price: 0. The module now falls back to the product's billing cycles and, if needed, reads the price table for the visitor's currency.
  • No invented zero. An item whose price cannot be resolved carries no price field, so Analytics does not average a fake zero into the reports.

Notes​

  • No database migration is needed. The ledger table is created on first use.
  • Installations without a Measurement Protocol secret keep reporting the purchase from the invoice page, which is the fallback path.