Shopify + Stape server-side tracking losing Google Ads attribution when customers use Shop Pay or PayPal
I have a Shopify store using Stape server-side tracking, and I am running into what looks like a conversion attribution issue with third-party payment processors. From what I can tell, when a customer comes in through a paid Google Ad and then checks out…
I have a Shopify store using Stape server-side tracking, and I am running into what looks like a conversion attribution issue with third-party payment processors. From what I can tell, when a customer comes in through a paid Google Ad and then checks out using Shop Pay, PayPal, or another third-party payment option, the purchase does not always get attributed back to the original ad click in Google Ads. It seems like the session may be breaking during checkout, or maybe the client ID / GCLID / customer data is not persisting all the way through to the thank you page. The result is that I can see users coming from paid ads, but the actual purchase conversion often does not connect back to the campaign properly. This is becoming a pretty big issue because it affects Google Ads optimization. Roughly one-third to two-thirds of my orders seem like they may not be recording correctly in Google Ads, which makes it much harder to trust the data or optimize campaigns properly. Has anyone dealt with this issue on Shopify using Stape server-side tracking? Specifically, I am trying to figure out: How to make the client ID / GCLID persist through third-party checkout flows like Shop Pay or PayPal. Whether there is a proper server-side setup that fixes this. Whether the issue is caused by Shopify checkout limitations, cross-domain tracking, the thank you page, or something else. Whether anyone has found a reliable solution that keeps Google Ads attribution intact after checkout. Any advice, setup examples, or things to check would be greatly appreciated.
Collected discussion
Your comment in r/shopify was automatically removed as your 'post' karma is below 10 (we do not consider your total karma; your post and comment karma are separate numbers and must both meet their minimum requirement). You can increase your post karma by posting in other areas of Reddit to earn upvotes. The higher quality the content, the higher your karma will become. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
Your comment in r/shopify was automatically removed as your 'post' karma is below 10 (we do not consider your total karma; your post and comment karma are separate numbers and must both meet their minimum requirement). You can increase your post karma by posting in other areas of Reddit to earn upvotes. The higher quality the content, the higher your karma will become. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
Dealt with this exact thing. Shop Pay and PayPal redirect through external domains (shop.app, paypal.com), and your GCLID lives in a cookie/URL param that doesn't survive the hop, so by the thank-you page it's gone and Google logs it as direct. Fix: stop relying on the GCLID persisting through checkout. Capture it on first landing, store it server-side in Stape's data store, then re-attach it to the server-side purchase event. Even better, fire the conversion off the Shopify "order paid" webhook with the stored GCLID attached, so it doesn't depend on the thank-you page at all. Also, if you're using Stape's Custom Loader via Custom Pixel, there's a known bug where it loads late and drops gclid, load your web container early instead. Won't be 100% (PayPal and consent denials always leak), but this takes you from missing two-thirds to maybe 5-10%. Are you on Checkout Extensibility?
Thank you for your reply. How do you load the web container early?
Your comment in r/shopify was automatically removed as your 'post' karma is below 10 (we do not consider your total karma; your post and comment karma are separate numbers and must both meet their minimum requirement). You can increase your post karma by posting in other areas of Reddit to earn upvotes. The higher quality the content, the higher your karma will become. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
For loading the container early, the trick is to put your GTM snippet straight into your theme rather than letting Stape's Custom Loader handle it. Go to Online Store > Themes > Edit code, open theme.liquid and drop the snippet right after the opening head tag. That Custom Loader is almost certainly your culprit, it injects the container 5-8 seconds after the page loads, and that delay is exactly when the gclid gets lost before anything captures it. So the setup that works is theme.liquid for all your storefront capture, and the Custom Pixel only for the checkout and purchase events. Checkout Extensibility is just Shopify's newer checkout system that replaced the old checkout.liquid, which they fully retired in 2026. It matters to you because checkout and thank-you page tracking now only fires through a Custom Pixel, so if your store was never upgraded to it, your pixel isn't firing there at all, and that could be a chunk of your missing conversions right there. Worth checking under Settings > Checkout that your Thank You and Order Status pages are on the upgraded version. And if Shopify auto-migrated you at some point, double-check your GTM still actually fires, because the auto-upgrade carries over the official app integrations but not custom GTM setups like yours.
Your comment in r/shopify was automatically removed as your 'post' karma is below 10 (we do not consider your total karma; your post and comment karma are separate numbers and must both meet their minimum requirement). You can increase your post karma by posting in other areas of Reddit to earn upvotes. The higher quality the content, the higher your karma will become. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
Also what is checkout extensibility?
“Losing attribution after checkout” is such a pain. I’ve dealt with this on Shopify + server-side setups where the issue was basically the Stape events not firing with the right click_id/GBRAID consistently (especially around consent + redirect timing), and once that was fixed, conversions started matching again. This kind of attribution break usually comes down to event payload consistency, not “Google Ads being weird.”
Yeah this can happen with Shopify + third-party checkout/payment flows. I wouldn’t expect Shopify, GA4, Stape, and Google Ads to match perfectly, but if 30-60% of purchases are missing from Google Ads, that’s enough to affect optimization. I’d check where the break happens first: is the gclid/gbraid/wbraid captured on landing, does it persist through checkout, and is the purchase event firing with the right user/session data after Shop Pay or PayPal? Also separate “tracking is broken” from “attribution is different.” Shopify is the source of truth for revenue. Google Ads is more directional for optimization. If the issue is mostly Shop Pay/PayPal orders, I’d start there instead of changing the whole setup.
This comment was deleted.
This comment was deleted.
This comment was deleted.
This comment was deleted.