Skip to main content
Moodle → MetaIntegration guide

Connecting Moodle to Meta Conversions API

Moodle is self-hosted open-source learning management, used mostly by institutions where enrolment and payment are usually two different systems. Meta's pixel loses a large share of conversions to Safari, ad blockers and iOS, and the Conversions API exists because of it. The join between them succeeds or fails on one thing: whether the fbc and fbp values reaches the Moodle enrolment before the conversion happens, because Meta can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Moodle to Meta CAPI: Purchase for paid enrollments only

Send paid enrollments server-side as Purchase with the course fee, hashed email, and fbc and fbp stored in a profile field at sign-up, using the payment or enrollment ID as event_id. Run exports at least daily, since Meta rejects events over seven days old. Send account creation only as valueless CompleteRegistration.

Meta matches well on hashed email, and that is the one advantage a Moodle site has: every learner has an account, usually with a confirmed email address. Send paid enrollments from the server as Purchase with the course fee as value, the hashed email, and the fbc and fbp values you stored in a profile field at sign-up. Use the payment or enrollment ID as event_id, so a retried webhook or an export that overlaps the previous run does not count twice.

Timing matters more with a scheduled export than with an event observer. Meta rejects website events stamped more than seven days in the past, so a weekly export of paid enrollments loses part of every batch. Run it at least daily, or send from an event observer when the payment plugin completes.

Free self-enrollments, cohort syncs and manual enrollments must never reach Meta as Purchase. If you want account creation as an upper-funnel signal, send it as CompleteRegistration with no value and keep Purchase for paid only, or Meta optimizes toward people who join free courses. School and employer email domains match Meta profiles poorly, so add hashed phone where your sign-up form collects it, and keep course titles out of custom_data if they reveal anything personal about the learner.

Moodle → Meta · what breaks

Why this join usually fails — Moodle → Meta

  1. 01

    The fbc and fbp values 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.

  2. 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.

  3. 03

    Double counting from broken deduplication

    Server and browser both fire, the event_id does not match, and Meta counts two purchases. Reported ROAS goes up, the business does not, and it can run for months before anyone reconciles against the store.

  4. 04

    Nothing reconciles afterwards

    Events Manager shows received events, the deduplication state and an Event Match Quality score per event. Events arriving is not the test — deduplicated, well-matched events arriving is. Compare Meta's reported purchases against your store's order count for the same window.

Moodle → Meta · the fix

What working looks like — Moodle → Meta

  • The fbc and fbp values on every enrolment

  • Conversions arriving in Meta

    Events appear in Events Manager with an Event Match Quality score, deduplicated against the pixel, and become usable for optimization and attribution.

  • Reconciled against the source

Moodle → Meta · architecture

How Moodle and Meta actually connect

  1. 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. 2

    Meta Conversions API needs a click to match

    Meta matches server events to people using whatever identifiers you send, hashed with SHA-256 where required. There is no single mandatory key, which is why quality varies so much between implementations — a poorly matched event is accepted, reported, and worth much less than it appears.

  3. 3

    The identifier is the bridge

    The fbc and fbp values, captured at the visit and carried into the Moodle enrolment.

  4. 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. 5

    Deduplication at the destination

    Meta deduplicates on the pair of event_name and event_id. The browser pixel and the server event must send the same event_id for the same conversion, within the deduplication window. Get this wrong and every purchase counts twice — which is by far the most common Conversions API failure and it inflates reported ROAS rather than reducing it.

Moodle → Meta · normal or broken

Working vs. broken, side by side — Moodle → Meta

Normal, not a fault

  • The fbc and fbp values present on the enrolment

  • Sent from the Moodle enrolment event via a webhook plugin or scheduled export

  • Deduplicated correctly

    Meta deduplicates on the pair of event_name and event_id. The browser pixel and the server event must send the same event_id for the same conversion, within the deduplication window. Get this wrong and every purchase counts twice — which is by far the most common Conversions API failure and it inflates reported ROAS rather than reducing it.

  • Reconciles with the source

Actually broken

  • The fbc and fbp values 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

    Server and browser both fire, the event_id does not match, and Meta counts two purchases. Reported ROAS goes up, the business does not, and it can run for months before anyone reconciles against the store.

  • Nobody has reconciled it

Moodle → Meta · diagnose

Diagnostic order — Moodle → Meta

  1. 01

    Count enrolments carrying the fbc and fbp values

  2. 02

    Follow one real conversion end to end

  3. 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.

  4. 04

    Read Event Match Quality and the deduplication indicator

    In Events Manager, open the event and check both. A low match quality means weak identifiers; a missing deduplication indicator means your event_id pairing is broken.

  5. 05

    Read the match rate, not the success message

    Events Manager shows received events, the deduplication state and an Event Match Quality score per event. Events arriving is not the test — deduplicated, well-matched events arriving is. Compare Meta's reported purchases against your store's order count for the same window.

Moodle → Meta · prove

How it gets proven — Moodle → Meta

Source of truth

Moodle's enrolment records in your own database, filtered to paid enrolment methods.

  • The fbc and fbp values confirmed present on a live enrolment.
  • Deduplication confirmed in Events Manager on a real purchase, with the browser and server events visibly paired rather than counted twice.
  • Paid enrolments confirmed separated from free and cohort-synced ones before anything is sent.

Moodle → Meta · free audit

What we check in the free audit

  • Count enrolments carrying the fbc and fbp values
  • Follow one real conversion end to end
  • Break down enrolments by enrolment method
  • Read Event Match Quality and the deduplication indicator
  • Read the match rate, not the success message

Checked against

Moodle's enrolment records in your own database, filtered to paid enrolment methods.

Get my free conversion tracking audit

Free30 minutesNo obligation

Moodle → Meta · when not to buy

When you don't need this — Moodle → Meta

  • Measure identifier coverage yourself first — pull your last hundred enrolments and count how many carry the fbc and fbp values.
  • If your Moodle is purely internal training with no paid enrolment, there is no conversion here to measure.
  • If you are not running Meta ads at meaningful spend, the Conversions API is effort without payoff. It earns its cost when the optimization signal is worth improving.

Moodle → Meta · what we deliver

What gets built — Moodle → Meta

  • 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 Meta

    Server-side events to the Conversions API with the event_id matched to the pixel, action_source set correctly, and customer data hashed before it leaves your infrastructure.

  • 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.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Moodle → Meta questions, answered

Send Purchase from the server when the payment plugin confirms, with hashed email, the stored fbc and fbp, and the enrollment or payment ID as event_id. Send within seven days.

Free · 30 min

Get Moodle and Meta joined properly

Free30 minutesNo obligation