Tracking purchase after user returns from external payment

Viewed 33

I have a hybrid app where the store is built on Webview the rest is native mobile. Users access the store via the menu button.

Since the store is web, I set up dataLayer variables where I have user information such as nickname, id, etc and also an ecommerce object where the items in the store are shown. I have also added dataLayer events such as view_item, process_purchase and purchase_completed.

I have integrated GA4 and GTM and I pass all dataLayer variables as event parameters so I can have organized.

The main problem is that, when users pay their order via card, they are taken outside the website to the payment provider solution, and then once the payment is finished, they return to the payment confirmation page where I set up the "purchase_completed" dataLayer event. This appears to break the tracking of the funnel, so sometimes purchase_completed event does not fire, or sometimes it fires but empty (no data on datalayer).

Is there a way I can fix this issue?

1 Answers

To me, your problem sounds rather shop related, than GTM related. If your DataLayer.push event is malfunctioning (either empty or not firing at all), you need to your code. GTM does not care for a funnel, if the dataLayer event fires and both trigger as well as tag are setup corretly, the tag is executed.

Related