Cherry Seed

What happens to tracking when PayPal redirects?

paypal redirect woocommerce purchase-tracking data-loss server-side

Quick Answer

Standard plugin-based GA4 tracking routinely misses 15–40% of WooCommerce transactions involving payment redirects like PayPal, according to MDNiamul's 2026 audit data. When a customer leaves your site to pay on paypal.com and the redirect back to your thank-you page fails, times out, or the customer closes the tab before returning, the purchase event JavaScript never executes. GA4, Google Ads, and Meta never record the sale — even though WooCommerce processed the payment successfully. Server-side tracking eliminates this entirely by firing the event from the payment-complete webhook, making the browser path irrelevant.

Full Answer

Most WooCommerce tracking plugins work by injecting JavaScript on the order confirmation page. The script reads the order details from the dataLayer and fires a purchase event to GA4, Google Ads, Meta, or whichever platform is configured. This depends on one assumption: the customer actually reaches that page with the script intact.

PayPal breaks that assumption. The customer leaves your domain, completes payment on paypal.com, and PayPal redirects them back. If the redirect fails — a mobile connection drops, the customer closes the browser, PayPal's return URL times out, or a pop-up blocker interferes — the confirmation page never loads and the tracking script never fires. The same pattern applies to Stripe 3D Secure, Klarna, Afterpay, and any gateway that sends the browser off-site. The sale is real, the money arrived, but your analytics platforms have [no record of it](https://mdniamul.com/blog/ga4-woocommerce-tracking-fix-missing-purchases/).

The fix is architectural: move the purchase event trigger from the browser to the server. When tracking fires from WooCommerce's payment_complete hook — a server-side event triggered by the payment gateway's webhook confirming the charge — the customer's browser path becomes irrelevant. Whether they returned to the confirmation page, closed the tab, or lost connectivity, the event fires because the server received the payment confirmation directly. That is the structural difference between [client-dependent and server-driven tracking](https://seresa.io/blog/server-side-tracking/five-signs-your-woocommerce-tracking-is-broken-and-you-dont-know-it).

Sources

Programmatic Access

GET https://seresa.io/wp-json/cherry-tree-by-seresa/v1/seeds/1108

Cite This Answer

Cherry Tree by Seresa - https://seresa.io/seed/data-loss-recovery/what-happens-to-tracking-when-paypal-redirects