Skip to main content
PayPal → MatomoIntegration guide

Connecting PayPal to Matomo

PayPal holds the settled transaction, and it is frequently the payment method that reports worst. 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 PayPal transaction 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

PayPal orders in Matomo: send the visitor ID or lose the source

Read Matomo's visitor ID from its first-party cookie before the PayPal redirect, store it on the order, and send the ecommerce order through Matomo's HTTP Tracking API when PayPal reports the capture. Use the same order ID for confirmation-page tracking, since Matomo ignores duplicate order IDs, and pick one revenue definition.

Matomo can record an ecommerce order sent from your server through the HTTP Tracking API, which is the clean way to count PayPal buyers who never return to the confirmation page. The part that decides whether the order is attributed is the visitor ID. Read Matomo's visitor ID from the first-party cookie before the redirect to PayPal, store it on the order, and send it with the order. Without it, Matomo records the order against a new visitor with no campaign, and PayPal revenue piles up under Direct.

Use the same order ID for the server-side order and for any confirmation-page tracking, because Matomo ignores a second ecommerce order with an order ID it has already recorded. That lets you keep the browser call for buyers who do come back while the server covers the rest. Set the revenue to one definition, gross or net of PayPal's fee, and note it, since Matomo will not reconcile against PayPal on its own.

Self-hosting gives this pair one practical advantage: the PayPal webhook and the Matomo tracker can live on the same infrastructure, so the order hit never leaves your control. It also means a stalled archiving job hides yesterday's PayPal orders from reports. Check archiving before assuming the server call failed.

PayPal → Matomo · what breaks

Why this join usually fails — PayPal → Matomo

  1. 01

    The first-party visitor ID never reaches PayPal

    The classic PayPal flow bounces the buyer to paypal.com and back. If the buyer abandons the return, your site never runs the thank-you page and never fires anything, but PayPal has already taken the money. This is why PayPal-heavy stores routinely under-report: the sale is real and the tracking event does not exist.

  2. 02

    The buyer never comes back from PayPal

    Money moves, the confirmation page never loads, and the conversion is invisible. It is the single biggest reason PayPal-heavy stores see paid channels look worse than they are.

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

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

PayPal → Matomo · the fix

What working looks like — PayPal → Matomo

  • The first-party visitor ID on every transaction

  • 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

PayPal → Matomo · architecture

How PayPal and Matomo actually connect

  1. 1

    PayPal holds the truth

    The transaction record carries the amount, currency and a transaction ID. It is also the record that survives when the buyer is redirected out to PayPal and never returns to your confirmation page.

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

    The identifier is the bridge

    The first-party visitor ID, captured at the visit and carried into the PayPal transaction.

  4. 4

    The event source decides reliability

    Listen for PAYMENT.CAPTURE.COMPLETED and send from your server. Firing on the return URL loses every buyer who closes the tab at PayPal, which is a much larger share than most merchants expect.

  5. 5

    Deduplication at the destination

    Matomo deduplicates ecommerce orders on order ID. Without one, a refreshed confirmation page records a second order.

PayPal → Matomo · normal or broken

Working vs. broken, side by side — PayPal → Matomo

Normal, not a fault

  • The first-party visitor ID present on the transaction

  • Sent from the PayPal webhook (or your order record when the IPN lands)

  • 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

    The classic PayPal flow bounces the buyer to paypal.com and back. If the buyer abandons the return, your site never runs the thank-you page and never fires anything, but PayPal has already taken the money. This is why PayPal-heavy stores routinely under-report: the sale is real and the tracking event does not exist.

  • Sent from the browser

    Money moves, the confirmation page never loads, and the conversion is invisible. It is the single biggest reason PayPal-heavy stores see paid channels look worse than they are.

  • 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

PayPal → Matomo · diagnose

Diagnostic order — PayPal → Matomo

  1. 01

    Count transactions carrying the first-party visitor ID

  2. 02

    Follow one real conversion end to end

  3. 03

    Compare completed PayPal transactions against confirmation-page loads

    For the same day. The gap between the two is the share of PayPal revenue your browser-side setup is structurally unable to see.

  4. 04

    Check tracker reachability and database lag before debugging any tag

    On self-hosted analytics the answer is infrastructure more often than instrumentation.

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

PayPal → Matomo · prove

How it gets proven — PayPal → Matomo

Source of truth

PayPal's Activity report, filtered to completed payments for the same window.

  • The first-party visitor ID confirmed present on a live transaction.
  • Orders reconciled against the Matomo ecommerce log with order-ID deduplication verified.
  • A PayPal order where the buyer never returned to the site, confirmed to have reported anyway.

PayPal → Matomo · free audit

What we check in the free audit

  • Count transactions carrying the first-party visitor ID
  • Follow one real conversion end to end
  • Compare completed PayPal transactions against confirmation-page loads
  • Check tracker reachability and database lag before debugging any tag
  • Read the match rate, not the success message

Checked against

PayPal's Activity report, filtered to completed payments for the same window.

Get my free conversion tracking audit

Free30 minutesNo obligation

PayPal → Matomo · when not to buy

When you don't need this — PayPal → Matomo

  • Measure identifier coverage yourself first — pull your last hundred transactions and count how many carry the first-party visitor ID.
  • If PayPal is under a few percent of your orders, fixing the whole flow may not move a decision. Measure the share first.
  • 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.

PayPal → Matomo · what we deliver

What gets built — PayPal → Matomo

  • Identifier capture into PayPal

    Capture the click identifier before checkout and store it against the order in your own database, keyed by the PayPal order ID. PayPal's own custom_id / invoice_id fields can carry your order reference so the two records can always be re-joined server-side.

  • Event source: the PayPal webhook (or your order record when the IPN lands)

    Listen for PAYMENT.CAPTURE.COMPLETED and send from your server. Firing on the return URL loses every buyer who closes the tab at PayPal, which is a much larger share than most merchants expect.

  • Dispatch to Matomo

    The Matomo HTTP Tracking API, posted server-side from your order system.

  • Reversals where they exist

    PAYMENT.CAPTURE.REFUNDED and the dispute webhooks exist and carry the same reference, so reversals can be wired properly.

Written guarantee

95%+ tracking accuracy

Measured against PayPal's Activity report, filtered to completed payments for the same window.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

PayPal → Matomo questions, answered

Because the server-side order was sent without the visitor ID from the original visit. Capture it before the PayPal redirect and include it with the order.

Free · 30 min

Get PayPal and Matomo joined properly

Free30 minutesNo obligation