Ecommerce order tag not firing

Hey :slight_smile:

We’re experiencing an issue where orders are not tracked and therefore measured as abandoned carts.

Below is a part of a Piwik session log where the user reached the thank-you page by placing an order. However, the order tag isn’t firing and then the order is measured as abandoned cart:

20:12 Page view
Page title: Yourhosting
Page URL: https://shop.account.yourhosting.nl/steps/package-configuration/
Time on page: 59s

20:13 Add to cart (1 product)
Page title: Yourhosting
Item SKU: ced854f7-fbc8-45e1-826c-db88439b4de1
Item name: Doorsturen
Brand: Yourhosting
Variant: hertime-toshine.com
Item category: hosting
Item price: € 11,88
Item quantity: 1
Item revenue: € 11,88

20:13 Page view
Page title: Yourhosting
Page URL: https://shop.account.yourhosting.nl/steps/checkout
Time on page: 1m 13s

20:14 Page view
Page title: Yourhosting
Page URL: https://shop.account.yourhosting.nl/processing-payment?order=XXXXX
Time on page: 24s

20:14 Page view
Page title: Yourhosting
Page URL: https://shop.account.yourhosting.nl/thank-you
Time on page: 5s

20:14 Goal conversion
Page title: Yourhosting
Goal name: Thank you page reached
Revenue: € 0,00
Page URL: https://shop.account.yourhosting.nl/thank-you

20:15 Page view
Page title: Yourhosting
Page URL: Yourhosting | Login
Time on page: 1m 14s

20:16 Abandoned cart (1 product)
Page title: Yourhosting
Lost Revenue: € 11,88
Unique item count: 1
Item SKU: ced854f7-fbc8-45e1-826c-db88439b4de1
Item name: Doorsturen
Brand: Yourhosting
Variant: hertime-toshine.com
Item category: hosting
Item price: € 11,88
Item quantity: 1
Item revenue: € 11,88

We’re measuring the Ecommerce order within Piwik Tag Manager, based on the dataLayer purchase event. Attached some images of how the Ecommerce order tag and trigger is configured and a purchase event example.

Hi @jelletvs,

Does this happen to all purchase events or just some of the orders?
Please check for any broken events which appear in the tracker debugger.

Hey Kamil,

Unfortunately the debugger isn’t properly working for us.

The debugger opens yourhosting.nl, but when our shop is located at our subdomain shop.account.yourhosting.nl.

So when using the debugger, the debugger overlay disappears when I go from yourhosting.nl to shop.account.yourhosting.nl.

We do have all settings regarding cross-domain and cross subdomain activated in the Piwik settings and also added all subdomains to the Sites & apps > Data collection tab.

Hi @jelletvs,

Here is a guide on how you can open the tracker debugger - About the tracker debugger | Piwik PRO help center
The tracker debugger shows what events have been tracked but also shows broken events (events which for example had incorrect data types sent as values)

It seems that you are thinking about the Debug Mode which is activated on the website

Hey Kamil,

Forgot to answer your earlier question. Yes, this happens for all orders.

I now checked the tracking debugger and I don’t see any broken events.

Below an example of where multiple add-to-cart events are measured and then the order is successfully placed, because the thank-you page is reached.

On the thank-you page the dataLayer purchase event is pushed, so I don’t understand why Piwik can’t see/measure this purchase event.

Hi @jelletvs,

Is there any way that we can test this?
Also, when I’ve went to your website I noticed that you are adding the Piwik PRO script once the consent is given however this doesn’t happen right after we give consent but we need to reload the page first. This means that you are losing some of the traffic.

We recommend to integrate your third-party consent tool instead and configure everything in Piwik PRO - How can I integrate a third-party cookie consent tool with Piwik PRO? | Piwik PRO help center

Have a great day! :slight_smile:

Hey @kamilb

Unfortunately there’s not a test environment where we can test this. In order to fire the purchase event, an actual order has to be placed.

Is there any other way you can debug this?

Regarding the consent: I added the compliance settings in Google Tag Manager to make sure our third-party consent tool (CookieYes) is working properly with Piwik. Also updated every tag in Piwik Tag Manager to make sure they all need Analytics consent.