Install guide
Magento 2 · Adobe Commerce

Magento records 1,000. GA4 sees 600.

A Magento 2 / Adobe Commerce module that fires GA4 purchase events server-to-server on sales_order_place_after. Same transaction_id as the client-side gtag fire so GA4 dedups natively. Closes the 30-50% gap from ad-blockers, Safari ITP, iOS 14.5+, and JavaScript errors. Ships with a reconciliation dashboard so you can see all three numbers side by side.

# composer or app/code · GA4 MP server-side · reconciliation dashboard
1

Install the module: composer or manual.

Two paths. Composer is preferred for production-mode stores; manual app/code/ works today without any composer set-up.

# Path A — composer (recommended once published) composer require tagdrishti/module-tagtrust bin/magento module:enable TagDrishti_TagTrust bin/magento setup:upgrade bin/magento setup:di:compile bin/magento cache:flush # Path B — manual (works today, no composer needed) cp -r plugins/magento/TagDrishti_TagTrust \ /path/to/magento/app/code/TagDrishti/TagTrust cd /path/to/magento bin/magento module:enable TagDrishti_TagTrust bin/magento setup:upgrade bin/magento setup:di:compile # skip in developer mode bin/magento cache:flush
Compatibility: Magento 2.4+ / Adobe Commerce 2.4+, PHP 7.4+. Works alongside any existing GTM / GA4 setup — the module ADDS the server-side path on top, never replaces existing tags.
2

General config: workspace + region + monitoring notice.

Free TagDrishti account at accounts.tagdrishti.com/sign-up. The workspace UUID is on your dashboard.

Magento admin → StoresConfigurationSalesTagDrishtiGeneral:

FieldWhat to enter
Enable TagDrishtiYes
Workspace IDUUID from your TagDrishti dashboard
Data residency regionEU for EU/UK (GDPR), APAC for India / SE Asia / MENA, US for Americas, AU for Australia / NZ
Monitoring notice URLYour privacy-notice URL (recommended for GDPR Art. 13 / DPDP Rule 9)
Multi-storefront: Magento's Store View Scope works as expected — configure each store view independently if customer bases differ in region or compliance posture.
3

GA4 credentials: Measurement ID + API secret.

The GA4 Measurement Protocol needs both. The Measurement ID is public (format G-XXXXXXXXXX); the API secret authorises the server-side POST.

  1. GA4 admin → AdminData Streams → click your web stream → copy the Measurement ID.
  2. Same screen → Measurement Protocol API secretsCreate → name it "Magento server-side". Copy the value — it's shown once.
Encrypted at rest: Magento stores the API secret in encrypted scope-config (env.php key). It never leaves your Magento instance.
4

Enable server-side purchases: flip the switch.

In Magento admin, under Stores → Configuration → Sales → TagDrishti → GA4 — close the revenue-tracking gap:

  1. Paste the GA4 Measurement ID and API Secret.
  2. Toggle Send server-side purchase eventsYes.
  3. (Recommended for first install) toggle Send test events to GA4 DebugViewYes. Place a real test order. The purchase event should appear in GA4 DebugView within 30 seconds with transaction_id = order increment_id.
  4. Once verified, flip DebugView back to No — debug events do NOT count towards GA4 reports.
  5. Run bin/magento cache:flush after every settings change.
How dedup works: the server-side event uses the same transaction_id (order increment_id) as the client-side gtag fire. GA4 dedups natively within a 4-hour window. Client blocked → server-side wins. Server-side network error → client-side wins. Never doubles, never misses.
5

Reconciliation relay: issue a relay token.

Optional but recommended — the dashboard at dashboard.tagdrishti.com/dashboard/magento-tag-trust only lights up once you wire this.

  1. Open dashboard.tagdrishti.com/dashboard/integrations/magento-tag-trust.
  2. Click Issue relay token. Plaintext shown once — copy it.
  3. Back in Magento admin → Sales → TagDrishti → Reconciliation dashboard relay:
    • Enable reconciliation relayYes.
    • Relay token → paste the plaintext.
  4. Click Save Config + run bin/magento cache:flush.
Failure is silent. The relay POST is fire-and-forget — if TagDrishti is unreachable, you lose dashboard data for that order; GA4 already received the event regardless. The customer's order placement never blocks on relay status.

Verify: place a test order.

Three checks. First two prove the event reached GA4; third proves the reconciliation dashboard is wired.

  1. Place a real test order on the storefront (a small one through to thank-you page).
  2. GA4 admin → DebugView (with debug toggle on from step 4). The purchase event should arrive within 30 seconds with transaction_id matching the Magento order increment_id, plus value, currency, items[].
  3. Open dashboard.tagdrishti.com/dashboard/magento-tag-trust. Headline tile should show TagDrishti delivered ≥ 1, with the order visible in the per-order ledger below.
# what_we_send_to_ga4

Full GA4 ecommerce schema. No mapping work for you.

Built from the order's authoritative server-side data — not a JS reconstruction. Items array, coupons, currency, tax, shipping, all there.

GA4 paramSource
transaction_idorder increment_id (also used for client/server dedup)
valueorder grand_total
currencyorder order_currency_code
taxorder tax_amount
shippingorder shipping_amount
items[]each order item: item_id (sku), item_name, price, quantity, item_category
couponorder coupon_code (if present)
client_idSHA-256(email) for logged-in customers, fallback quote.{quote_id} for guests
# when_events_arent_landing

Diagnostic checklist (walk in order, stop at the first hit).

  1. Did the module enable? bin/magento module:status TagDrishti_TagTrust should show enabled. If not, run bin/magento module:enable TagDrishti_TagTrust + setup:upgrade.
  2. Is the storefront tracker rendering? View source on any storefront page. The TagDrishti <script> should be in the <head>. Missing means the workspace UUID is invalid OR you forgot the cache flush after saving config.
  3. Is dataLayer firing? DevTools console → window.dataLayer. Should include tagdrishti_cms = 'magento' + tagdrishti_store_code. Missing means the layout XML didn't load — flush cache, check production-mode static-content deploy.
  4. Is the server-side MP firing? Place a test order. Check Magento logs at var/log/system.log for a tagdrishti_send_ga4_mp entry. Missing means the toggle is off OR sales_order_place_after didn't fire (rare; Magento 2.4+).
  5. Is GA4 accepting the event? GA4 admin → DebugView with debug toggle on. Should see purchase within 30 seconds. If not, the Measurement ID or API secret is wrong — regenerate the secret in GA4 admin.
  6. Is the reconciliation dashboard showing data? Check dashboard.tagdrishti.com/dashboard/magento-tag-trust. TagDrishti delivered = 0 means the relay token is missing / wrong / disabled. Re-issue from the Integrations page + cache flush.
# or_install_on

Same engine, different platform.

14 days · your store · no card

Recover the orders GA4 didn’t see.

Composer install, paste GA4 credentials, place a test order. Within an hour the dashboard is showing you what GA4 missed and what TagDrishti server-side recovered. 14 days free, no card.