On this page
What this issue is
With card payments on your own checkout, the customer lands on a thank-you page straight after paying. With PayPal, and with banks that ask for 3D Secure (an extra identity check, often a code in a banking app), the customer leaves your site, pays elsewhere, and is then sent back to a return URL.
If your only purchase tracking is a browser tag on that return page, the sale is recorded only if the customer actually comes back. The payment can succeed and the order can exist in your shop, while GA4 shows nothing.
- CheckoutCustomer picks PayPal or pays by card with 3DS
- PayPal / bank pagePayment is approved
- Return to your siteCustomer closes the tab or the redirect fails
- Thank-you page tagpurchase event never fires
- GA4 and ad platformsSale never reported
The customer pays on PayPal or the bank page, but never returns to your site, so the browser tag never runs.
Why it costs you leads or sales
You do not lose the order, but you lose the proof of where it came from. GA4 revenue falls below your shop's revenue, and Google Ads, Meta and other platforms see fewer conversions than really happened. Smart bidding learns from the conversions it sees, so it can under-value the campaigns that bring PayPal buyers.
The gap also skews reports. PayPal-heavy audiences, such as mobile shoppers, can look worse than they are, and you may cut budget from channels that are working.
Example: 100 orders in the shop, of which 30 were paid via PayPal or 3DS and 8 of those buyers never returned. GA4 sees 92.
How to check if your site has it
Pick a period and count orders
Export paid orders from your shop for the last 7 to 30 days, with the payment method for each.
Count GA4 purchases
In GA4 go to Reports > Monetization > Ecommerce purchases, or use Explore with transaction_id as a dimension. Export the transaction IDs.
Find the orders missing from GA4
Match both lists on order ID. If the missing ones are mostly PayPal, Klarna-style redirects or 3DS payments, you have this issue.
Run a test order
Pay with PayPal sandbox or a 3DS test card, then close the tab on the PayPal page before returning. Check GA4 DebugView and the order. If the order exists but no purchase appears, the tag depends on the return.
How to fix it
There are two layers. First, make the return as reliable as possible. Second, stop depending on the return by sending the purchase from your server when the payment is confirmed.
Turn on automatic return
In PayPal, enable Auto Return (Account Settings > Website payments) and set the return URL to your thank-you page. This sends buyers back without clicking.
Make the return URL carry the order
Make sure the return page can look up the order (order ID or token in the URL) so the purchase event has a real transaction_id and value.
Send the purchase from the server
When your shop gets the payment confirmation (webhook), send a purchase event to GA4 with the Measurement Protocol, using the same client_id as the visitor's browser session.
Deduplicate with transaction_id
Send the same transaction_id from the browser and the server. GA4 counts one purchase per transaction_id, so a buyer who does return is not double counted.
Store the client_id with the order
Read the GA4 client ID from the _ga cookie at checkout and save it on the order, so the server event can be attributed to the right session.
Use WooCommerce's payment webhook
Fire your tracking on the order status change to processing or completed (hook woocommerce_payment_complete), not only on the thank-you page. Many GA4 plugins offer a server-side or Measurement Protocol option; check your plugin's settings.
Enable PayPal Auto Return
Set it in your PayPal account and check the return URL in the WooCommerce PayPal gateway settings.
Track with Customer Events
Shopify's order status page runs for PayPal returns, but buyers who do not return are missed. Use a server-side option such as the Google & YouTube app's purchase tracking or an app that sends purchases from Shopify's order webhook.
Avoid editing old checkout scripts
Additional scripts on the order status page are being replaced by Customer Events. Move any purchase tag there.
Use a server container if you can
A server-side GTM container can receive a purchase from your backend and forward it to GA4. Keep the browser tag too, with the same transaction_id.
Fire on the right trigger
Trigger the browser purchase tag on the dataLayer purchase event, not a page URL that depends on the redirect path.
Send the event from your payment webhook
Call the Measurement Protocol from the code that handles the PayPal or PSP confirmation. See the snippet below.
// Run when your payment webhook confirms the payment
const MEASUREMENT_ID = 'G-XXXXXXXXXX';
const API_SECRET = 'your_api_secret';
async function sendPurchase(order) {
const url = `https://www.google-analytics.com/mp/collect?measurement_id=${MEASUREMENT_ID}&api_secret=${API_SECRET}`;
await fetch(url, {
method: 'POST',
body: JSON.stringify({
client_id: order.ga_client_id, // saved at checkout from the _ga cookie
events: [{
name: 'purchase',
params: {
transaction_id: order.id,
value: order.total,
currency: order.currency,
items: order.items.map(i => ({ item_id: i.sku, item_name: i.name, price: i.price, quantity: i.qty }))
}
}]
})
});
}Browser tag only
- Purchase fires only on the return page
- Buyers who close the tab are never tracked
- GA4 revenue is below shop revenue
Browser plus server
- Purchase sent when payment is confirmed
- Same transaction_id prevents double counting
- GA4 orders match the shop
How to confirm it's fixed
- Place a PayPal sandbox order and close the tab before returning: the purchase still appears in GA4 (Realtime or DebugView).
- Place a 3DS test-card order and complete it normally: only one purchase appears for the transaction_id.
- The server event shows the right value, currency and items.
- After a week, shop orders and GA4 purchases match more closely, especially for PayPal orders.
- Ad platform conversions for redirect payments no longer lag behind the shop.
How to prevent it happening again
- Compare shop orders and GA4 purchases by payment method each month.
- Re-test PayPal and 3DS after changing payment plugins, checkout themes or return URLs.
- Keep the same transaction_id format in browser and server events.
- Document where the purchase is sent from, so an update does not remove one of the two sources.
- Rotate the API secret only with a plan to update the server code.
How FunnelGuard handles this
FunnelGuard detects this issue only partly. Its robot visitor runs your checkout journey on a schedule and checks each step and the tracking hits sent to GA4 and other platforms. By design it stops before payment unless your store's test mode is set up, and it never enters real card details.
| Check | Covered? |
|---|---|
| Checkout steps work up to the payment step | Yes |
| Purchase tracking on a test order, if the store's test mode is set up | Yes, when test mode is configured |
| Real PayPal or 3DS payment and the return to your site | No, it stops before payment |
| Buyers who pay and never return | No |
| Comparison of shop orders with GA4 purchases | No |
To cover the rest by hand, run the monthly order-to-GA4 comparison from the check section and test a PayPal sandbox order where you close the tab before returning. FunnelGuard will still alert you if the checkout steps or tracking hits it can reach break. You can start with the Free plan (1 site, 2 journeys, daily checks, no card) or a 3-day trial of any paid plan.
Why it happens: a typical timeline
0:00
Buyer clicks the PayPal button at checkout.
0:30
Buyer approves the payment on PayPal. The shop receives the confirmation and creates the order.
0:31
Buyer closes the tab instead of returning.
0:32
The thank-you page never loads, so no purchase is sent to GA4.
Questions people ask
Why is my GA4 purchase count lower than my real orders?
Common causes are ad blockers, consent choices and redirect payments. If the missing orders are mostly PayPal or 3D Secure, the purchase tag probably runs only on the page buyers return to, so anyone who does not return is not tracked.
Why is purchase not tracked when customers pay with PayPal?
PayPal takes the buyer off your site. Your purchase tag fires only when they come back to your thank-you page. If they close the tab or the redirect fails, the order exists but GA4 never receives the event.
How do I track PayPal purchases in GA4 reliably?
Turn on PayPal Auto Return, and send the purchase from your server with the GA4 Measurement Protocol when the payment is confirmed. Use the same transaction_id in browser and server events so GA4 does not count the sale twice.
Does 3D Secure break GA4 purchase tracking?
It can. 3DS sends the buyer to their bank for a check and then back to your site. If the return is slow, blocked or abandoned, a browser-only purchase tag does not run, even though the payment went through.
Will sending the purchase from the server double count sales?
Not if both events carry the same transaction_id. GA4 uses transaction_id to avoid counting the same purchase twice, so keep the browser tag and add the server event.
How do I attribute a server-side purchase to the right campaign?
Save the GA4 client ID from the _ga cookie on the order at checkout, then send it as client_id in the Measurement Protocol call. This ties the server event to the visitor's original session.
Can FunnelGuard test PayPal or 3DS purchases?
Only in part. FunnelGuard checks your checkout up to the payment step and stops there unless your store's test mode is set up. It does not complete real PayPal or 3DS payments, so you should also test a sandbox order by hand.
Related issues
- TRK-077purchase event missing on order confirmationFix guide
- TRK-078purchase sent without transaction_idFix guide
- TRK-079purchase fires twice (refresh of thank-you page)Fix guide
- TRK-082purchase value differs from order totalFix guide
- TRK-096Subscription renewals not tracked as purchasesFix guide
- TRK-097Upsell / one-click post-purchase not trackedFix guide