Connecting LearnDash to GA4
LearnDash runs courses inside WordPress, which means enrolment can happen through a purchase, a membership, a manual grant or a coupon — and only one of those is revenue. 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 LearnDash enrolment 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
LearnDash enrolments in GA4: paid, free and granted kept apart
To send LearnDash enrollments to GA4, send paid enrollments as purchase with the course as item and free or granted access as a separately named event without value. Save the _ga client_id and session_id to order meta and send purchase via Measurement Protocol with the order ID as transaction_id, using one sender per order. Add PayPal to unwanted referrals.
GA4 is the one destination where free and granted LearnDash enrolments are worth sending, as their own events. A course site wants to see how many people a campaign enrolled for free, how many paid and how many arrived through a membership, and GA4 can hold all three provided only one of them is purchase. Send paid enrolments as purchase with the course as the item, and free or granted ones as a separately named event with no value.
Because LearnDash runs on your own WordPress domain, GA4's browser tag already sees most of the journey, which is unusual among course and payment sources. The gap is the payment step: a PayPal redirect can return the buyer as a referral (add PayPal to unwanted referrals), and a buyer who never comes back from PayPal never fires the browser purchase. For those, save the _ga client_id and session_id to the order meta at checkout and send purchase via Measurement Protocol from the order, with the order ID as transaction_id.
Then choose one sender per order, browser or server, never both, because GA4 will not deduplicate them for you. Course progress and completion belong in GA4 as engagement events: useful for seeing which campaigns bring students who finish, never conversions.
LearnDash → GA4 · what breaks
Why this join usually fails — LearnDash → GA4
- 01
The GA4 client_id never reaches LearnDash
Checkout runs through whichever WooCommerce or membership plugin is attached, so the identifier has to survive an extra handoff.
- 02
Granted access counted as sales
An admin enrolling a cohort, a membership granting bundled access and a coupon at one hundred percent all produce enrolment records identical to a paid one. Counting them inflates revenue by whatever your free access volume is.
- 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.
LearnDash → GA4 · the fix
What working looks like — LearnDash → GA4
The GA4 client_id on every enrolment
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
LearnDash → GA4 · architecture
How LearnDash and GA4 actually connect
- 1
LearnDash holds the truth
LearnDash enrols users from several sources. Course access granted by a membership plugin or by an admin is not a sale and must not be counted as one.
- 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 LearnDash enrolment.
- 4
The event source decides reliability
Send paid enrolments at the amount charged. Free and granted enrolments carry no value.
- 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.
LearnDash → GA4 · normal or broken
Working vs. broken, side by side — LearnDash → GA4
Normal, not a fault
The GA4 client_id present on the enrolment
Sent from the payment record joined to the enrolment
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
Checkout runs through whichever WooCommerce or membership plugin is attached, so the identifier has to survive an extra handoff.
Sent from the browser
An admin enrolling a cohort, a membership granting bundled access and a coupon at one hundred percent all produce enrolment records identical to a paid one. Counting them inflates revenue by whatever your free access volume is.
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
LearnDash → GA4 · diagnose
Diagnostic order — LearnDash → GA4
- 01
Count enrolments carrying the GA4 client_id
- 02
Follow one real conversion end to end
- 03
Split enrolments by how access was granted
One field, and on established course sites the free share is usually larger than expected.
- 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.
LearnDash → GA4 · prove
How it gets proven — LearnDash → GA4
Source of truth
Paid enrolments from your payment system, held apart from free and granted access.
- The GA4 client_id confirmed present on a live enrolment.
- Server events confirmed in DebugView attaching to an existing session with the original traffic source intact.
- Paid enrolments reconciled at charged amounts against imported conversions.
LearnDash → GA4 · free audit
What we check in the free audit
- Count enrolments carrying the GA4 client_id
- Follow one real conversion end to end
- Split enrolments by how access was granted
- Check whether server events carry a session and a source
- Read the match rate, not the success message
Checked against
Paid enrolments from your payment system, held apart from free and granted access.
Free30 minutesNo obligation
LearnDash → GA4 · when not to buy
When you don't need this — LearnDash → GA4
- Measure identifier coverage yourself first — pull your last hundred enrolments and count how many carry the GA4 client_id.
- If every enrolment is a direct purchase, one conversion action is correct and simpler.
- 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.
LearnDash → GA4 · what we deliver
What gets built — LearnDash → GA4
Identifier capture into LearnDash
Capture on landing and pass through the purchase flow to the enrolment record.
Event source: the payment record joined to the enrolment
Send paid enrolments at the amount charged. Free and granted enrolments carry no value.
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 reverse and should revoke access.
Written guarantee
95%+ tracking accuracy
Measured against Paid enrolments from your payment system, held apart from free and granted access.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
LearnDash → GA4 questions, answered
Send a purchase event with the course as the item when payment completes, from the browser or via Measurement Protocol from the order. Track free and granted enrolments as a separate event with no value.
The buyer returned from PayPal's checkout and GA4 started a referral session. Add PayPal's domain to your unwanted referrals list.
Almost always because the GA4 client_id never reached the LearnDash enrolment. Checkout runs through whichever WooCommerce or membership plugin is attached, so the identifier has to survive an extra handoff. 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 payment record joined to the enrolment. Send paid enrolments at the amount charged. Free and granted enrolments carry no value.
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 LearnDash → GA4
- LearnDash + GoogleGoogle Ads and GA4 tracking for LearnDash
- Stripe → GA4Connecting Stripe to GA4
- PayPal → GA4Connecting PayPal to GA4
RELATED GUIDES
Where LearnDash → GA4 fits in the rest of your tracking
- Absorb → GA4Connecting Absorb LMS to GA4
- iSpring → GA4Connecting iSpring Learn to GA4
- Tovuti → GA4Connecting Tovuti to GA4
- LearnDash → PostHogConnecting LearnDash to PostHog
- LearnDash → MixpanelConnecting LearnDash to Mixpanel
- EducationConversion tracking for education providers, measured in enrollments
- Moodle → GA4Connecting Moodle to GA4
- 360Learning → GA4Connecting 360Learning to GA4
Free · 30 min
Get LearnDash and GA4 joined properly
Free30 minutesNo obligation
