vulvani
Forum Replies Created
-
Hi Torben,
thank you for the quick and detailed response. That helps a lot in customizing the thank you page whilst ensuring everything gets tagged properly.
Hi Torben,
thanks, I know this. Because I have updated the order received page through a plugin as well as in your described way, the purchase event didn’t fire and thus the plugin was sending wrong data.
So my question was, when I do change the URL structure of order-received page, how do I ensure that the purchase event is firing? As it didn’t work with updated URLs.
Do I have to set something up within the GTM Kit Plugin or do I do it in Google Tag Manager directly? Do you have a suggestion?
Hi Torben,
thank you for the hint. Indeed the thank you page had another URL, because some other plugin was messing with the WooCommerce URLs. After a lot of debugging, test purchases, resetting everything and regenerating standard WC pages, the purchase event fires successfully including the correct value.
Is it possible to use a custom order received URL? I would like to use my custom thank you page. How do I ensure that the purchase event fires? Do I have to change something in the plugin or do I edit the Tag Manager Tag/Trigger?
Hi Torben,
thank you so much for looking into this.
After updating and testing it still seems that value is reset to 0.
This is the data layer from checkout page. I can see that the structure has changed: https://prnt.sc/-S_x8_-5deoo
This is the data layer from thank you page (/order-received): https://prnt.sc/83e0TR23ixS7
What I can see after the update that the row
ecommerce: {currency: “EUR”, value: 0, items: null},
has changed to:
ecommerce: {currency: “EUR”, value: 0, items: []},
Hi,
I found out that the purchase event was not firing due to custom payment gateway.
So I tried to test the purchase event with another temporary payment method. I used WC built-in Cash on delivery method.
I don’t know if it is the payment method Cash on delivery, or if it is something else, but in the step between Checkout page and Thank you page, the transaction value will be set to 0.
Do you know what causes this? Does the plugin not work with Cash on delivery? Unfortunately I don’t have a possibility to test another payment gateway.
Here is the Data Layer on Checkout page (item: null might be because it is a virtual product):
pagePostType: “page”,
pageType: “checkout”,
postTitle: “Checkout”,
userLoggedIn: false,
ecommerce: {currency: “EUR”, value: 49, items: null},
pages: {
cart: “/de-cart”,
checkout: “/checkout”,
orderReceived: “/checkout/order-received”,
myAccount: “/my-account”And here is the Data Layer on Thank you page:
pagePostType: “page”,
pageType: “checkout”,
postTitle: “Thank you”,
userLoggedIn: true,
user_id: 804,
ecommerce: {currency: “EUR”, value: 0, items: null},
pages: {
cart: “/de-cart”,
checkout: “/checkout”,
orderReceived: “/checkout/order-received”,
myAccount: “/my-account”As you can see, the value gets lost after payment, so that the value won’t be reflected on GA4 as well.
Yes, the user gets redirected back to order-received page.
I just tested the payment flow with cash on delivery. Here it works. So it is actually the payment gateway.
WooCommerce