Connecting Swell to GA4
Swell is headless commerce with subscriptions built in, which puts two conversion types in one system: a one-off order and a recurring plan that will bill again next month. GA4 is where the business goes to understand what happened, which makes an unattributed conversion there expensive in decisions rather than in ad spend. The join between them succeeds or fails on one thing: whether the GA4 client_id reaches the Swell order before the conversion happens, because GA4 can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Swell orders in GA4: first purchases apart from renewals
On a headless Swell store, send purchase either from your confirmation route or by Measurement Protocol from the order webhook with stored client_id, using the Swell order ID as transaction_id, but not both. Send renewals as a custom subscription_renewal event, not purchase, carry plan and interval in items, and check GA4 purchases against Swell first orders.
Swell is headless, so the storefront is your code and the GA4 tag is yours too; nothing breaks the session unless you send buyers to a checkout on a separate domain. Send purchase from the browser on your own confirmation route with the Swell order ID as transaction_id, or from the order webhook by Measurement Protocol with the client_id saved in order or customer metadata. Choose one. GA4 will not deduplicate the two.
Renewals are the specific problem. A subscription renewal that Swell bills months later has no browser session at all, so it can only reach GA4 by Measurement Protocol, and if it arrives as purchase it inflates purchase counts and first-time purchaser reports. Send renewals as a custom event such as subscription_renewal, with value and currency, and register the value as a custom metric for retention reporting.
Use the items array on the first order to carry the subscription plan and billing interval, so you can compare which channels bring annual subscribers and which bring monthly ones. Send refunds inside the first period as refund with the original transaction_id. Checking the result is simple: GA4 purchases for a month should be close to Swell's first orders for that month, not its total payments.
Swell → GA4 · what breaks
Why this join usually fails — Swell → GA4
- 01
The GA4 client_id never reaches Swell
Headless storefront plus recurring billing means the renewal happens months later with no session and no storefront involved.
- 02
Renewals indistinguishable from new orders
In a combined store the export gives you a list of payments. Without a first-versus-renewal flag, a customer on a monthly plan generates a conversion every month against the click that acquired them once.
- 03
Everything lands under (direct)/(none)
The classic Measurement Protocol symptom, and it always means the same thing: the client_id was missing or wrong, so GA4 had no session to attach the event to and invented a new user.
- 04
Nothing reconciles afterwards
GA4 DebugView shows events arriving with their parameters, and Realtime confirms the user and session they attached to. Neither tells you whether you are double-counting — for that, compare GA4's conversion count against the source system's record for the same window.
Swell → GA4 · the fix
What working looks like — Swell → GA4
The GA4 client_id on every order
Conversions arriving in GA4
Conversions appear in GA4 attributed to the original session's source and medium, so acquisition reporting reflects what actually drove revenue.
Reconciled against the source
Swell → GA4 · architecture
How Swell and GA4 actually connect
- 1
Swell holds the truth
A subscription's first payment and its renewals are the same object type in most exports. Sending both means one acquisition produces a conversion every billing cycle.
- 2
GA4 needs a click to match
GA4 needs the client_id to attach a server event to the user and session that produced the click. Without it there is no attribution to inherit and the event is orphaned.
- 3
The identifier is the bridge
The GA4 client_id, captured at the visit and carried into the Swell order.
- 4
The event source decides reliability
Send one-off orders and first subscription payments. Renewals belong in a retention figure.
- 5
Deduplication at the destination
GA4 has no built-in deduplication for Measurement Protocol. If the browser also sends the event, it counts twice. The only reliable approach is to decide per event which side sends it, and enforce that decision — GA4 will not protect you from your own duplicates.
Swell → GA4 · normal or broken
Working vs. broken, side by side — Swell → GA4
Normal, not a fault
The GA4 client_id present on the order
Sent from the Swell order and subscription webhooks
Deduplicated correctly
GA4 has no built-in deduplication for Measurement Protocol. If the browser also sends the event, it counts twice. The only reliable approach is to decide per event which side sends it, and enforce that decision — GA4 will not protect you from your own duplicates.
Reconciles with the source
Actually broken
The GA4 client_id missing on most records
Headless storefront plus recurring billing means the renewal happens months later with no session and no storefront involved.
Sent from the browser
In a combined store the export gives you a list of payments. Without a first-versus-renewal flag, a customer on a monthly plan generates a conversion every month against the click that acquired them once.
Counted twice, or not at all
The classic Measurement Protocol symptom, and it always means the same thing: the client_id was missing or wrong, so GA4 had no session to attach the event to and invented a new user.
Nobody has reconciled it
Swell → GA4 · diagnose
Diagnostic order — Swell → GA4
- 01
Count orders carrying the GA4 client_id
- 02
Follow one real conversion end to end
- 03
Compare monthly conversion count against new customer count
If conversions exceed new customers, renewals are being counted as acquisition.
- 04
Check whether server events carry a session and a source
In GA4 Realtime or DebugView, find the event and look at its session and traffic source. A brand-new user with no source on every server event is the missing-client_id signature.
- 05
Read the match rate, not the success message
GA4 DebugView shows events arriving with their parameters, and Realtime confirms the user and session they attached to. Neither tells you whether you are double-counting — for that, compare GA4's conversion count against the source system's record for the same window.
Swell → GA4 · prove
How it gets proven — Swell → GA4
Source of truth
Swell orders and subscriptions by date, held apart from each other.
- The GA4 client_id confirmed present on a live order.
- Server events confirmed in DebugView attaching to an existing session with the original traffic source intact.
- First payments reconciled against imported conversions, with renewals reported separately.
Swell → GA4 · free audit
What we check in the free audit
- Count orders carrying the GA4 client_id
- Follow one real conversion end to end
- Compare monthly conversion count against new customer count
- Check whether server events carry a session and a source
- Read the match rate, not the success message
Checked against
Swell orders and subscriptions by date, held apart from each other.
Free30 minutesNo obligation
Swell → GA4 · when not to buy
When you don't need this — Swell → GA4
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the GA4 client_id.
- A store selling only one-off products does not have the renewal problem.
- GA4 is reporting, not bidding. If your problem is ad platform optimization, fix the ad platform destination first — GA4 will not change what any campaign does.
Swell → GA4 · what we deliver
What gets built — Swell → GA4
Identifier capture into Swell
Write the identifier into customer metadata so the first payment can be attributed and renewals can be recognised as renewals.
Event source: the Swell order and subscription webhooks
Send one-off orders and first subscription payments. Renewals belong in a retention figure.
Dispatch to GA4
Measurement Protocol events with the client_id, session_id and the correct measurement ID and API secret, sent server-side.
Reversals where they exist
Refunds and cancellations inside the first period reverse.
Written guarantee
95%+ tracking accuracy
Measured against Swell orders and subscriptions by date, held apart from each other.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Swell → GA4 questions, answered
By Measurement Protocol with the customer's stored client_id, as a custom event rather than purchase. Renewals have no browser session, and counting them as purchases inflates acquisition.
Either, but only one. GA4 does not deduplicate Measurement Protocol events against browser events, so sending both doubles revenue.
Almost always because the GA4 client_id never reached the Swell order. Headless storefront plus recurring billing means the renewal happens months later with no session and no storefront involved. Measure coverage before debugging the dispatch.
The client_id, from the _ga cookie. Measurement Protocol events without it are rejected or create a brand-new user with no session and no source, which is how server events end up filed under (direct)/(none) and make paid channels look worse than they are. Send session_id alongside it so the event joins the existing session, and include engagement_time_msec or the event may not appear as expected in reports.
The Swell order and subscription webhooks. Send one-off orders and first subscription payments. Renewals belong in a retention figure.
GA4 DebugView shows events arriving with their parameters, and Realtime confirms the user and session they attached to. Neither tells you whether you are double-counting — for that, compare GA4's conversion count against the source system's record for the same window.
More on Swell → GA4
- Stripe → GA4Connecting Stripe to GA4
- PayPal → GA4Connecting PayPal to GA4
- HubSpot → GA4Connecting HubSpot to GA4
RELATED GUIDES
Where Swell → GA4 fits in the rest of your tracking
- Checkout Extensibility → GA4Connecting Shopify Checkout Extensibility to GA4
- WooCommerce Subscriptions → GA4Connecting WooCommerce Subscriptions to GA4
- Squarespace → GA4Connecting Squarespace Commerce to GA4
- Swell → AmplitudeConnecting Swell to Amplitude
- Swell → MatomoConnecting Swell to Matomo
- Furniture ecommerceConversion tracking for furniture ecommerce, measured after delivery
- Braintree → GA4Connecting Braintree to GA4
- Saleor → GA4Connecting Saleor to GA4
Free · 30 min
Get Swell and GA4 joined properly
Free30 minutesNo obligation
