Piwik showing more orders than placed

I have limited the date range to: 17th - 18th May and checked the ecommerce overview. Piwik states 58 orders on WooCommerce.

WooCommerce analytics says 47 orders, and even GA4 says 47 orders.

I switched to the “Orders List” section in Piwik and even that is different, it shows “53 items”. How is it stating 58 orders but doesn’t even have 58 orders in the orders list.

My implementation is adding the Piwik container code via GTM, and I’m also using the Piwik WordPress plugin too.

Any suggestions on what to check as to why I am seeing higher values than actual?

Hi wharfdale!

Have you checked whether there are any duplicated order IDs in the Piwik PRO ecommerce reporting section?


I’ve checked the Order IDs from the Ecommerce Reports - Order List and none are duplicated.

*Update: I compared the IDs from Piwik with those from WooCommerce, one of them was an order placed on 14th May and yet my date range is set to show me only those from 17th - 18th. I checked the order it was placed and paid for on 14th, so it wasn’t as if it started on 14th but was only just paid on 17th for example.

Checking the others now too, but for starters, why is the above happening?

*I’ve found 5 orders from the Piwik order list which were dated before 17th, so none of these should be on that list considering the date range I have selected.

Hi wharfdale!

The reporting side looks fine - as you can see, the order date is 18/05/2023. This date is an exact timestamp of the order event.

It looks like a visitor is revisiting the order confirmation page after some time (a couple of days) which causes the ecommerce order code to be executed. We’ll look into whether we can limit this to fire only on first view of the order confirmation page.

Yeah this is definetly needed, people re-visiting order confirmation pages are not that uncommon, so this is messing with everyones reporting I suspect. Duplicate visits, duplicate/double revenue etc.

Unless you have an ETA on this already, is there anything I can for now? I can’t really rely on any of the reporting whilst I know the same order is being counted more than once, our revenue (and other) reporting is now off.

Hi wharfdale!

I’ll keep the thread updated on this.

In the meantime - from what I understand, you are using the automatic ecommerce tracking capabilities of the WP plugin. The Piwik PRO WordPress plugin should add the Piwik PRO container code, so there should be no need to add it via GTM too.

Is there a reason for adding it twice? This approach will most likely result in errors.


Agreed, I realised the plugin is adding the container as well as GTM. However our preference would be adding the container code via GTM as we have other tags within there such as “Do not enable this tag if GDPR has not been accepted”. Whilst we know Piwik has it’s own tag manager and also compliance pop-ups etc. We’ve already got everything set up on GTM, so using that is easier.

So, my plan is: turn off the container from the plugin settings:

Leave the container to be added via GTM instead. Is this still a suitable method or do you see any major issues with this? We’re using the Custom HTML tag as normal.


Hi wharfdale!

The Piwik PRO WP plugin functionalities won’t work if you decide to disable the container.

Ok I will disable the GTM tag and enable container via the plugin. I will look into using the Piwik Tag Manager for when track or not to track.

Based on an update in version 16.28.0 (16.28.0 - Piwik PRO) this issue shouldn’t be happening if the Order ID is the same, which it is if all you’ve done is refresh/re-visited the page.

Ecommerce orders with the same order ID are reported once per session. If you track a few orders with the same order ID in a session, only the first one will be visible in reports.

Or is it, even if the order ID is the same, if you visit off a new session it’s recorded as a new order again? Despite the same order ID as before.

Hi wharfdale!

The order IDs are indeed deduplicated in a session context. What I have understood from your screenshots is that the user visited the confirmation page after a couple of days (the Piwik PRO timestamp points to 18/05/2023). This means that these were 2 different sessions.

Whilst I wait to see if you’re able to find a solution to this. An idea I had from my side - is there an appropriate hook/filter in the WordPress plugin which I can use to do my own check and prevent the data being sent to Piwik?

As the order received page is loaded, send the event, add meta data to the order such as ‘conversion sent = true’ then all future loads of that same page, it will do a quick check if that meta exists, if so, don’t run the Piwik conversion purchase event etc.

I have no problem doing this development, I just want to see if you’re aware of an appropriate hook/filter to use for this (if any)?

@anthonybartczak are there any appropriate hooks/filters to, when needed, prevent certain events from running when they match the conditions I set?

I’m adding metadata to my orders when the purchase event has been sent the first time. I now do a check, if that metadata exists, don’t send purchase event to piwik again.

Hi @wharfdale,

currently there is not such feature. Our team is working on a new plugin for WooCommerce which might include this.

Hi @wharfdale!

We have recently updated the WordPress plugin and you might be intereseted in some of the changes:


Release date: 26.09.2023

  • Add: Added a turn on/off switch to plugin’s settings of WooCommerce events.
  • Add: Added support for variants in the name and SKU fields.
  • Add: Added support for Piwik PRO’s enhanced ecommerce tracking for the WooCommerce plugin.
  • Fix: Removed deprecated Piwik PRO’s ecommerce tracking events for the WooCommerce plugin.
  • Fix: Prevented tracking of the same order more than once.
  • Fix: Fixed PHP Error: Call to a member function get_cart_contents() on null.
1 Like

Hi! So now a order is only counted once despite reloading a “thank you page” and firing the purchase event again a couple of days later?

After reloading or visiting the thank you page again the ecommerce order event should not be sent again.

Please keep in mind that this is in regards to the Piwik PRO WordPress plugin.

So using the piwik tag manager. If somebody reloads the thank you page after a couple of days a ecommerce order will be counted twice despite there being a unique transaction id/order id sent in according to your doc=

If somebody reloads the thank you page after a couple of days a ecommerce order will be counted twice

Depends on what triggers the order event. Some websites I have worked with already handle this and e.g. the dataLayer order event is not fired in case the thank you page is revisited/refreshed.

despite there being a unique transaction id/order id sent in according to your doc=

Piwik PRO doesn’t deduplicate the order ID “globally” in the Analytics module. It deduplicates it on a session level. So in case a second order event with the same order ID is registered in a single session, it will get deduplicated.

Uniqueness of the order ID

To improve report consistency and readability, we’ve also made changes to the Order ID. Now, you can only track the same Order ID once during a single session. If you try to track multiple orders with the same ID, it’s considered a problem with the setup and won’t be included in the report. We treat this as a broken event.