"the reason most analytics setups miss transactions is that they rely on a tracking code firing on the ‘thank you’ page. This might never trigger, maybe due to another slow running script on that page, or just that the customer navigates away after payment (knowing they will get an email confirmation).
What’s unusual about our solution is that we set up server-side tracking, rather than rely on any page load. So if the order is picked up by Shopify’s servers, and you get the payment, then we also send that on to GA – in a way that it can be linked with the pre-purchase behaviour."
I was wondering how this can be done? What logic we need to use in Shopify to achieve this and how the code will look?
Solved! Go to the solution
This is an accepted solution.
You probably know Shopify provides webhooks for calling your backend when specific events happen like add-to-carts and purchases.
When your backend is called, your backend could send data to GA. Perhaps you would want to check out this manual https://developers.google.com/analytics/devguides/collection/protocol/v1