I’m trying to troubleshoot an issue where the client-side Purchase event isn’t firing for a large percentage of purchases on a Shopify store.
About 30% of Online Store orders - actual web orders, not subscriptions, draft orders etc - never fire the normal client-side Purchase event (purchase_stape). In nearly all of these cases, there’s also no preceding checkout event with a cart_token that I could use to stitch the webhook Purchase back to the correct client_id and session_id.
As a result, the webhook captures the order and revenue, but GA4 has no session to attribute it to, so these purchases show as (not set) / Unassigned.
I know some customers may go through Shop/Shop Pay, but shouldn’t they ultimately land on the store’s Thank You page and still fire the client-side Purchase event? Either way, ~30% missing client-side purchases seems unusually high.
Has anyone seen something similar in their Shopify setups? Any ideas where you’d look first - thank you page/customizations, consent, Shop/Shop Pay behavior, or something else? Happy to share screenshots or more details
Yes, we had the same issue. In our case, the solution, or rather bad workaround, was quite trivial: force the user through the standard checkout first, before they can choose Shop Pay.
That way, the normal checkout flow is initiated and the necessary client-side identifiers are captured before Shop Pay takes over.
Hi,
There’s another method that also uses a webhook:
You can set up a webhook in Shopify Flow, if your Shopify plan supports it. Before the user reaches any of the checkout pages (whether it’s Shop Pay or the standard Shopify checkout), you can use a custom script to save the data you need to cart.js when the customer creates a cart.
The data saved in cart.js is then associated with the order and stored in your Shopify store. It can subsequently be retrieved via a webhook configured in Shopify Flow. You can then use this webhook to enrich your events.
By using this method, you can cover virtually all events that trigger the order_created event in your Shopify store.
Thank you @DigitalPartner! This option is definitely on the table with us. The store I’m working with is heavily optimized for Shop Pay… ok for conversion but challenging for attribution.
Thank you @Roman_Kaliniichuk! Very interested in learning more about this option - I’ll check it out - I have not worked with Shopify Flow yet - I’ll be checking