Add Google Analytics E-Commerce Integration
Objective
Enable merchants using Dodo Payments to track purchase funnel performance and revenue attribution in Google Analytics, using GA4 recommended e-commerce events.
Problem
Merchants currently lack a standardized, reliable way to measure:
Checkout conversion rate and drop-off points
Revenue, taxes, shipping, discounts, and refunds in GA4
Campaign and traffic source attribution to transactions
Product level performance and LTV signals
Scope
Implement GA4 e-commerce event instrumentation for the Dodo Payments checkout and post-payment lifecycle, with optional support for server-side reporting to improve accuracy.
Core Requirements
1) GA4 Client-Side Events (Checkout Funnel)
Emit GA4 events (via gtag or GTM dataLayer) from the Dodo hosted checkout pages:
view_item(when a product or plan is viewed, if applicable)add_to_cart(if cart exists)begin_checkoutadd_shipping_info(if shipping is collected)add_payment_infopurchase(on success page / confirmation)
Each event should support standard GA4 e-commerce parameters:
currency,value,tax,shipping,coupon,discounttransaction_iditems[]withitem_id,item_name,item_category,price,quantity
2) Refunds and Chargebacks
Support revenue corrections in GA4:
refund(full and partial)Chargeback or dispute lifecycle events as custom events (example:
dispute_opened,dispute_won,dispute_lost) withtransaction_idreference.
3) Merchant Configuration
In Dodo merchant dashboard:
Toggle: Enable GA4 e-commerce tracking
Input: GA4 Measurement ID (G-XXXX)
Optional: GTM Container ID
Mode selection:
Client-side only
Hybrid (client-side + server-side)
Server-side only (advanced)
4) Server-Side Tracking (Recommended)
Send GA4 events from Dodo backend for:
purchaserefundSubscription renewals (if subscriptions exist)
Failed payment attempts (custom event)
Use GA4 Measurement Protocol with:
client_idcaptured at checkout (and stored against the transaction)Optional
user_idsupport (if merchant provides it)Idempotency keys to avoid duplicates on retries
5) Attribution and Cross-Domain
Ensure attribution continuity for hosted checkout:
Preserve
gclid,gbraid,wbraid,utm_*parametersCross-domain linking support if merchant initiates checkout from their domain
Document required GTM/gtag settings for cross-domain measurement
Non-Functional Requirements
Privacy and compliance: honor consent mode where applicable
Avoid double counting: dedupe purchase events (client and server)
Low latency and resilience: backend events should be retry-safe
Observability: logs for emitted events and error reasons (PII redacted)
Acceptance Criteria
A merchant can enable GA4 e-commerce tracking and see:
Checkout funnel events in GA4 Realtime within minutes
A single
purchaseper transaction with correcttransaction_id,value,currency, anditems[]Refund events tied to the same
transaction_id
Attribution: traffic source and campaign are visible for purchase conversions
No PII is sent to GA4 (emails, phone numbers, addresses must be excluded)
Deliverables
Merchant dashboard settings page
Checkout instrumentation (GTM and gtag support)
Backend Measurement Protocol integration
Documentation:
Setup guide (GTM + direct gtag)
Event mapping reference
Troubleshooting (duplicates, missing client_id, blocked scripts)
Nice-to-Have
Enhanced conversions (only if compliant and consented)
BigQuery export guidance for GA4 + Dodo reconciliation
Built-in “Analytics Health” checker in Dodo dashboard (detect missing tags, blocked cookies, consent mode issues)
Log in to comment and vote
Comments2
Feb 9
PinnedWe have released this feature -
https://docs.dodopayments.com/features/analytics
R Chi
Jan 16
Any update?