Purchases missing after PayPal
Offsite payment means the thank-you page often never loads. Why Purchase fires from the payment hook instead, and why consent is stored at checkout.
updated
If your Purchase events go missing when customers pay with PayPal, the cause is almost always that the thank-you page never loaded. Customers close the tab, the redirect back fails, or the payment completes asynchronously by webhook long after the browser has gone. PixelCapi fires Purchase from the payment hook, server-side, so the sale is captured whether or not anyone ever sees the order-received page.
Why the thank-you page is the wrong trigger
A conversion tracked on the thank-you page depends on a chain of things that are not under your control: the customer staying in the flow, the gateway redirecting correctly, and the browser executing your script before it navigates away. Offsite gateways break that chain routinely — and every break is a sale you made and did not record.
What PixelCapi does instead
Purchase fires on the first of these to happen:
- the WooCommerce payment-complete hook, or
- the order moving to
processingorcompleted.
The event ID is generated at that moment and stored on the order. A guard flag is stored alongside it, so the event cannot fire twice for one order no matter how many status transitions follow.
If the customer does reach the thank-you page, the browser copy fires there — reusing the same event ID that was stored on the order, with its own re-fire guard. That is what makes the pair deduplicate correctly instead of double-counting.
Consent is recorded at checkout, not at send time
This is the part that catches people out when they turn consent gating on.
A payment webhook is a server-to-server request from the gateway. It carries no visitor cookies, no session and no consent state — there is no browser involved at all. Reading a consent decision at send time would therefore find nothing, and a fail-closed system would correctly drop every webhook-triggered purchase.
So the consent decision is stamped onto the order at checkout, while the visitor is still there, and consulted from the order when the event is finally sent. The customer’s actual choice is honoured even though the send happens minutes later with no browser present.
What to check if purchases are still missing
- Is the order actually reaching a paid status? No payment-complete hook, no event. Look at the order status first.
- Are the events queued but not sent? Check the plugin log for rows at
queued. Retries go 1 minute, 5 minutes, 30 minutes, then failed. - Is consent gating dropping them? If the consent source expects a banner that does not exist, everything fails closed. See step 6 of Events don’t show.
- Compare orders to events. Your store knows a sale happened; the platform may not have been told. That comparison is what Order-to-Event Reconciliation is being built to automate.
Related
Was this page helpful?