One GA4 setting first
The checkout pages have e-mail and phone fields
The order page already pushes a purchase event. This adds the GA4 tag that listens for it, only after cookie consent. Nothing is published. The steps below are for the owner: one real order, a check in GA4, then publish.
In this order. Every step can be undone except the order itself: it stays in WHMCS and its invoice is real. Ticks are saved in this browser only.
The checkout pages have e-mail and phone fields
File whmcs/gtm/ga4-purchase-etiketi.json
Product: Giriş, monthly, no coupon
Any line wrong: stop, do not publish, send the Tag Assistant screenshot.
No order needed
Only if steps 2 and 3 passed
Undo: GTM › Versions › previous version › Publish.
Two locks: GTM is not loaded at all without “Kabul et”, and the tag itself requires analytics_storage.
odendi = {{DLV - odendi}}analytics_storagepurchase (equals)// pushed by the hook, after consent, once per tab { "ecommerce": null } { "event": "purchase", "odendi": 0, "ecommerce": { "transaction_id": "<order number>", "value": <order total>, "currency": "TRY", "items": [{ "item_id", "item_name", "price", "quantity": 1 }] } } // no name, e-mail, phone, address or domain
The real hook ran in PHP 8.3 (WebAssembly). The order page ran in jsdom with the real consent script; requests to Google were recorded, never sent. The GTM side is an imitation that reads the import file, not GTM itself.
transaction_id is the visible order number (string), value is a number, currency TRY / EUR / TRY fallback, no personal data, empty on errors.
One gtm.js request. Order: consent default › gtm.js › ecommerce reset › purchase. Tag fires once.
Three reloads in the same tab: purchase pushed 0 times. A different order is still counted.
0 requests to Google, no purchase, nothing stored. Order number, heading and links work.
Panel open, no requests. “Kabul et” pushes the purchase once at that moment.
No refresh guard, no consent wait, fixed USD, internal id, value as text, no reset: each one fails a test.
Open points. None of them blocks the owner steps.
hosting-platform/whmcs/tema-yamalari/ before any theme deploy.whmcs/tema-yamalari/neurhost-satin-alma-olayi.phplive hook, byte-for-byte, unchangedwhmcs/tema-yamalari/nx-cerez.tpl, cerez-onay.jsconsent panel and script the hook depends onwhmcs/gtm/ga4-purchase-etiketi.jsonGTM import: 1 tag, 1 trigger, 1 variablewhmcs/test/npm install --ignore-scripts && npm testdocs/_calisma-ga4-satin-alma-2026-11-03.mdfull report with manual click steps