Connecting Moodle to TikTok Events API
Moodle is self-hosted open-source learning management, used mostly by institutions where enrolment and payment are usually two different systems. TikTok's audience skews to exactly the browsers and app contexts where browser-side tracking performs worst. The join between them succeeds or fails on one thing: whether the ttclid reaches the Moodle enrolment before the conversion happens, because TikTok can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Moodle to TikTok: the ttclid through sign-up and SSO
Persist the ttclid server-side when the course page loads and write it to a profile custom field at account creation. Send paid enrollments to TikTok's Events API as CompletePayment with fee, currency, payment or enrollment ID as event_id, and hashed email and phone. If paid volume is small, optimize on valueless CompleteRegistration.
TikTok traffic opens your course page in the in-app browser, and that visitor often creates the Moodle account later, in a regular browser or through a single sign-on page that does not carry query parameters. Persist the ttclid server-side the moment the course page loads, then write it to a user profile custom field at account creation if the same browser signs up. If sign-up happens elsewhere, the ttclid is gone and only hashed contact details can match.
Send paid enrollments to the Events API as CompletePayment with the course fee, currency, and the payment or enrollment ID as event_id, plus hashed email and phone as the fallback. For learners who switched browsers between the video and the sign-up, the hashed email is the only identifier left, so make sure your Moodle sign-up form collects the address people actually use.
TikTok suits short consumer courses with self-enrollment on payment, not institutional programs where the decision takes a term. If most enrollments on your site come from cohort sync, the paid minority may be too small for TikTok to optimize on. In that case optimize for CompleteRegistration on account creation, sent without value, and judge the campaign on paid enrollments in your own reports.
Moodle → TikTok · what breaks
Why this join usually fails — Moodle → TikTok
- 01
The ttclid never reaches Moodle
Moodle is typically behind a login and often behind a separate marketing site, so the click identifier has to survive from a public page through registration into a user profile field. Institutional single sign-on frequently breaks that chain entirely.
- 02
Free enrolments outnumbering paid ones
Self-enrolment, cohort sync and manual enrolment all create the same record type as a paid one. Counting them teaches bidding to find people who join free courses.
- 03
The ttclid is lost in the in-app browser
TikTok traffic arrives through an in-app webview whose storage behavior is inconsistent. An identifier captured but not immediately persisted server-side often is not there by the time the conversion happens.
- 04
Nothing reconciles afterwards
TikTok Events Manager shows received events and their match status. As with Meta, arriving is not the test — deduplicated and matched is. Reconcile TikTok's reported conversions against the source system for the same window.
Moodle → TikTok · the fix
What working looks like — Moodle → TikTok
The ttclid on every enrolment
Conversions arriving in TikTok
Events appear in TikTok Events Manager, deduplicated against the pixel, and become usable for optimization.
Reconciled against the source
Moodle → TikTok · architecture
How Moodle and TikTok actually connect
- 1
Moodle holds the truth
Moodle supports several enrolment methods at once — self-enrolment, manual, cohort sync, payment plugins — and most of them are free. Only the paid methods represent revenue and the others will swamp any blended count.
- 2
TikTok Events API needs a click to match
TikTok matches server events using ttclid where available, falling back to hashed contact information. Both should be sent — the fallback is what carries the events where the click ID did not survive.
- 3
The identifier is the bridge
The ttclid, captured at the visit and carried into the Moodle enrolment.
- 4
The event source decides reliability
Send paid enrolments only, from the server. Free and cohort-synced enrolments must be excluded or the conversion feed is dominated by activity that is not revenue.
- 5
Deduplication at the destination
TikTok deduplicates on event_id, the same pattern as Meta: the pixel and the Events API must send the same event_id for the same conversion. Mismatched IDs mean double counting.
Moodle → TikTok · normal or broken
Working vs. broken, side by side — Moodle → TikTok
Normal, not a fault
The ttclid present on the enrolment
Sent from the Moodle enrolment event via a webhook plugin or scheduled export
Deduplicated correctly
TikTok deduplicates on event_id, the same pattern as Meta: the pixel and the Events API must send the same event_id for the same conversion. Mismatched IDs mean double counting.
Reconciles with the source
Actually broken
The ttclid missing on most records
Moodle is typically behind a login and often behind a separate marketing site, so the click identifier has to survive from a public page through registration into a user profile field. Institutional single sign-on frequently breaks that chain entirely.
Sent from the browser
Self-enrolment, cohort sync and manual enrolment all create the same record type as a paid one. Counting them teaches bidding to find people who join free courses.
Counted twice, or not at all
TikTok traffic arrives through an in-app webview whose storage behavior is inconsistent. An identifier captured but not immediately persisted server-side often is not there by the time the conversion happens.
Nobody has reconciled it
Moodle → TikTok · diagnose
Diagnostic order — Moodle → TikTok
- 01
Count enrolments carrying the ttclid
- 02
Follow one real conversion end to end
- 03
Break down enrolments by enrolment method
If paid methods are a small minority, that minority is the only thing that should ever reach an ad platform.
- 04
Measure ttclid capture rate on TikTok traffic specifically
Not on all traffic. TikTok's in-app browser is the failure case, so a healthy overall capture rate can hide a poor one on exactly the traffic that matters.
- 05
Read the match rate, not the success message
TikTok Events Manager shows received events and their match status. As with Meta, arriving is not the test — deduplicated and matched is. Reconcile TikTok's reported conversions against the source system for the same window.
Moodle → TikTok · prove
How it gets proven — Moodle → TikTok
Source of truth
Moodle's enrolment records in your own database, filtered to paid enrolment methods.
- The ttclid confirmed present on a live enrolment.
- Deduplication confirmed in Events Manager, and ttclid capture rate measured on TikTok traffic specifically.
- Paid enrolments confirmed separated from free and cohort-synced ones before anything is sent.
Moodle → TikTok · free audit
What we check in the free audit
- Count enrolments carrying the ttclid
- Follow one real conversion end to end
- Break down enrolments by enrolment method
- Measure ttclid capture rate on TikTok traffic specifically
- Read the match rate, not the success message
Checked against
Moodle's enrolment records in your own database, filtered to paid enrolment methods.
Free30 minutesNo obligation
Moodle → TikTok · when not to buy
When you don't need this — Moodle → TikTok
- Measure identifier coverage yourself first — pull your last hundred enrolments and count how many carry the ttclid.
- If your Moodle is purely internal training with no paid enrolment, there is no conversion here to measure.
- If TikTok is a small share of spend, the effort is hard to justify. It pays when TikTok is a channel you are actively scaling.
Moodle → TikTok · what we deliver
What gets built — Moodle → TikTok
Identifier capture into Moodle
Capture the identifier on the public site and write it to a Moodle user profile custom field at account creation, so later paid enrolments can be traced back.
Event source: the Moodle enrolment event via a webhook plugin or scheduled export
Send paid enrolments only, from the server. Free and cohort-synced enrolments must be excluded or the conversion feed is dominated by activity that is not revenue.
Dispatch to TikTok
Server events to the TikTok Events API with the ttclid, hashed contact information and a matching event_id.
Reversals where they exist
Un-enrolments and refunds where a payment plugin is used should reduce the reported figure.
Written guarantee
95%+ tracking accuracy
Measured against Moodle's enrolment records in your own database, filtered to paid enrolment methods.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Moodle → TikTok questions, answered
Capture the ttclid when the visitor lands, save it on the Moodle user profile at sign-up, and send paid enrollments to the Events API with hashed email as the fallback.
The ttclid is usually lost when the learner leaves TikTok's in-app browser or signs in through SSO. Measure ttclid capture rate on TikTok traffic alone to see how much is lost.
Almost always because the ttclid never reached the Moodle enrolment. Moodle is typically behind a login and often behind a separate marketing site, so the click identifier has to survive from a public page through registration into a user profile field. Institutional single sign-on frequently breaks that chain entirely. Measure coverage before debugging the dispatch.
The ttclid — TikTok's click identifier, appended to your landing page URL and also stored in the _ttp cookie. TikTok additionally matches on hashed email and phone. In-app browser behavior makes ttclid capture more fragile than the equivalents on other platforms, so persisting it server-side as soon as it is seen matters more here than elsewhere.
The Moodle enrolment event via a webhook plugin or scheduled export. Send paid enrolments only, from the server. Free and cohort-synced enrolments must be excluded or the conversion feed is dominated by activity that is not revenue.
TikTok Events Manager shows received events and their match status. As with Meta, arriving is not the test — deduplicated and matched is. Reconcile TikTok's reported conversions against the source system for the same window.
More on Moodle → TikTok
- TikTok · Lead → booked callHow to track lead to booked call for TikTok Ads
- TikTok · Booked call → closed wonHow to track booked call to closed won for TikTok Ads
- TikTok · Free trial → paidHow to track free trial to paid for TikTok Ads
RELATED GUIDES
Where Moodle → TikTok fits in the rest of your tracking
- TikTok · Tutoring and test prepTikTok Ads conversion tracking for tutoring and test prep companies
- TikTok · BootcampsTikTok Ads conversion tracking for coding bootcamps and career training providers
- TikTok × Enrolment SystemHow to reconcile TikTok Ads against your application or enrolment system
- TikTok · Application → enrollmentHow to track application to enrollment for TikTok Ads
- Tutor LMS → TikTokConnecting Tutor LMS to TikTok Events API
- Moodle → SnapchatConnecting Moodle to Snapchat
- EducationConversion tracking for education providers, measured in enrollments
- LearnDash → TikTokConnecting LearnDash to TikTok Events API
Free · 30 min
Get Moodle and TikTok joined properly
Free30 minutesNo obligation
