Connecting Moodle to Matomo
Moodle is self-hosted open-source learning management, used mostly by institutions where enrolment and payment are usually two different systems. Matomo can be self-hosted with no third party in the chain, which makes it the one analytics destination where the data genuinely never leaves infrastructure you control. The join between them succeeds or fails on one thing: whether the first-party visitor ID reaches the Moodle enrolment before the conversion happens, because Matomo can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Tracking Moodle in Matomo: paid enrollments as ecommerce orders
Send paid enrollments to Matomo's Tracking API as ecommerce orders, with the payment record ID as order ID and the course as product. Join the marketing site and Moodle with cross-domain linking or a User ID set to the Moodle user ID. Track the LMS under its own site ID, or not at all.
Moodle and Matomo are often run by the same institution's IT team on the same servers, which makes this one of the few pairings where everything stays in-house. Send paid enrollments through the Matomo HTTP Tracking API as ecommerce orders, using the payment record's ID as the order ID and the course as the product, so a refreshed page or a retried job cannot count the same enrollment twice. Free and cohort-synced enrollments can go in as goals or events if you want them, but never as orders.
The join between the marketing site and the LMS is where it breaks. They usually live on different hostnames, so the visitor who read the course page becomes a new visitor in Moodle unless you enable Matomo's cross-domain linking, or set Matomo's User ID after login to the Moodle user ID rather than the email. Use the same identifier in the server-side order call so the order lands on the visitor who came from the campaign.
Second hazard: logged-in students generate enormous page-view volume on course pages, quizzes and forums, which buries the marketing funnel and fills the Matomo database faster than anyone planned. Track the LMS under its own site ID, or not at all, and keep the marketing site and checkout under one. Community plugins add the Matomo tracker to Moodle pages; check which one supports your Moodle version before installing.
Moodle → Matomo · what breaks
Why this join usually fails — Moodle → Matomo
- 01
The first-party visitor ID 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
Owning the pipeline means owning the outage
The advantage is that nothing blocks it. The cost is that when the tracking database fills or falls behind on a weekend, the data is gone and no vendor is paging anyone. Hosted tools fail more visibly.
- 04
Nothing reconciles afterwards
Matomo exposes raw visit logs, so you can inspect the actual hit rather than an aggregate. Check the log, and check ingestion lag alongside it.
Moodle → Matomo · the fix
What working looks like — Moodle → Matomo
The first-party visitor ID on every enrolment
Conversions arriving in Matomo
The event lands in your own database and is queryable directly, including the raw log, which most analytics products do not expose.
Reconciled against the source
Moodle → Matomo · architecture
How Moodle and Matomo 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
Matomo needs a click to match
The site ID, the visitor identifier and the event or ecommerce order. Self-hosted instances additionally need the tracker endpoint reachable and the database keeping up, which hosted tools do not fail at.
- 3
The identifier is the bridge
The first-party visitor ID, 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
Matomo deduplicates ecommerce orders on order ID. Without one, a refreshed confirmation page records a second order.
Moodle → Matomo · normal or broken
Working vs. broken, side by side — Moodle → Matomo
Normal, not a fault
The first-party visitor ID present on the enrolment
Sent from the Moodle enrolment event via a webhook plugin or scheduled export
Deduplicated correctly
Matomo deduplicates ecommerce orders on order ID. Without one, a refreshed confirmation page records a second order.
Reconciles with the source
Actually broken
The first-party visitor ID 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
The advantage is that nothing blocks it. The cost is that when the tracking database fills or falls behind on a weekend, the data is gone and no vendor is paging anyone. Hosted tools fail more visibly.
Nobody has reconciled it
Moodle → Matomo · diagnose
Diagnostic order — Moodle → Matomo
- 01
Count enrolments carrying the first-party visitor ID
- 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
Check tracker reachability and database lag before debugging any tag
On self-hosted analytics the answer is infrastructure more often than instrumentation.
- 05
Read the match rate, not the success message
Matomo exposes raw visit logs, so you can inspect the actual hit rather than an aggregate. Check the log, and check ingestion lag alongside it.
Moodle → Matomo · prove
How it gets proven — Moodle → Matomo
Source of truth
Moodle's enrolment records in your own database, filtered to paid enrolment methods.
- The first-party visitor ID confirmed present on a live enrolment.
- Orders reconciled against the Matomo ecommerce log with order-ID deduplication verified.
- Paid enrolments confirmed separated from free and cohort-synced ones before anything is sent.
Moodle → Matomo · free audit
What we check in the free audit
- Count enrolments carrying the first-party visitor ID
- Follow one real conversion end to end
- Break down enrolments by enrolment method
- Check tracker reachability and database lag before debugging any tag
- 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 → Matomo · when not to buy
When you don't need this — Moodle → Matomo
- Measure identifier coverage yourself first — pull your last hundred enrolments and count how many carry the first-party visitor ID.
- If your Moodle is purely internal training with no paid enrolment, there is no conversion here to measure.
- If you have no privacy or ownership requirement and no team to run it, a hosted product removes the only real cost of this one.
Moodle → Matomo · what we deliver
What gets built — Moodle → Matomo
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 Matomo
The Matomo HTTP Tracking API, posted server-side from your order system.
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 → Matomo questions, answered
Yes, as ecommerce orders sent from the server when a paid enrollment is created, keyed on the payment ID. Browser tracking alone misses learners who never return to a confirmation page after paying.
Usually not. Keep the public site and checkout in one site ID and put LMS activity in a separate one, or student page views will swamp every marketing report.
Almost always because the first-party visitor ID 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.
Matomo sets its own first-party cookie and, when self-hosted on your domain, is not a third-party request at all. That means ad blockers and browser tracking-prevention affect it far less than a hosted analytics tag — one of the few genuine measurement advantages available under current privacy conditions.
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.
Matomo exposes raw visit logs, so you can inspect the actual hit rather than an aggregate. Check the log, and check ingestion lag alongside it.
More on Moodle → Matomo
- Moodle → Google AdsConnecting Moodle to Google Ads
- Moodle → MetaConnecting Moodle to Meta Conversions API
- Moodle → GA4Connecting Moodle to GA4
RELATED GUIDES
Where Moodle → Matomo fits in the rest of your tracking
- Litmos → MatomoConnecting Litmos to Matomo
- Paid Memberships Pro → MatomoConnecting Paid Memberships Pro to Matomo
- Absorb → MatomoConnecting Absorb LMS to Matomo
- Moodle → Adobe AnalyticsConnecting Moodle to Adobe Analytics
- Moodle → GA4Connecting Moodle to GA4
- EducationConversion tracking for education providers, measured in enrollments
- LifterLMS → MatomoConnecting LifterLMS to Matomo
- Docebo → MatomoConnecting Docebo to Matomo
Free · 30 min
Get Moodle and Matomo joined properly
Free30 minutesNo obligation
