# Unique count order id miscalculation?

**URL:** <https://community.piwik.pro/t/unique-count-order-id-miscalculation/1090>\
**Category:** Reports and working with data\
**Created:** [October 7, 2022, 7:31pm UTC](https://community.piwik.pro/t/unique-count-order-id-miscalculation/1090 "2022-10-07T19:31:42Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dave](https://community.piwik.pro/u/dave)\
**Post date:** [October 7, 2022, 7:31pm UTC](https://community.piwik.pro/t/unique-count-order-id-miscalculation/1090/1 "2022-10-07T19:31:42Z")

</div>

Not sure if this is a bug or me missing something?

 ![v10](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/1f887b594e72e5fee5812f271e175b64a84a2469.jpeg)

Thxs  
Dave

---

<div class="post-metadata">

**Author:** ![Admin](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Admin](https://community.piwik.pro/u/Admin)\
**Post date:** [October 12, 2022, 7:02am UTC](https://community.piwik.pro/t/unique-count-order-id-miscalculation/1090/2 "2022-10-12T07:02:42Z")

</div>

What’s the date range? We added order deduplication late September.

---

<div class="post-metadata">

**Author:** ![dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dave](https://community.piwik.pro/u/dave)\
**Post date:** [October 12, 2022, 8:10am UTC](https://community.piwik.pro/t/unique-count-order-id-miscalculation/1090/3 "2022-10-12T08:10:01Z")

</div>

can’t remember but this is from yesterday

 ![2](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/12c23d97cb7c1faae487a3fba4eac224c9536dc0.jpeg)

The 3 conversions in the last channel (websites) are coming from the payment provider. Not sure if we can exclude these? Checkout is not taking longer than 30 min.

---

<div class="post-metadata">

**Author:** ![Admin](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Admin](https://community.piwik.pro/u/Admin)\
**Post date:** [October 12, 2022, 11:22am UTC](https://community.piwik.pro/t/unique-count-order-id-miscalculation/1090/4 "2022-10-12T11:22:56Z")

</div>

Let’s maybe limit the date range and check it on a custom report: flat table containing `Channels - customized` and `Order ID` as dimensions. AFAIK order id deduplication works on session level, so if there are same order ids for different sessions with different channel, the presented outcome would be possible.

---

<div class="post-metadata">

**Author:** ![dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dave](https://community.piwik.pro/u/dave)\
**Post date:** [October 12, 2022, 12:27pm UTC](https://community.piwik.pro/t/unique-count-order-id-miscalculation/1090/5 "2022-10-12T12:27:36Z")

</div>

A flat table with data from yesterday. Still seeing the same issue on the count of unique order id’s

 ![1](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/67e563b8b2e66c1ddba3ded12bbbf84291809dc7.jpeg)

When checking the order list from yesterday i see 29 of them

 ![1](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/9442e26142081b9a224ff1549c2c144ed9fba81a.jpeg)

So if we take away the email & paid order that doesn’t show revenue and the 3 from websites (payment provider gateway) we get at 29.

---

<div class="post-metadata">

**Author:** ![Admin](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Admin](https://community.piwik.pro/u/Admin)\
**Post date:** [October 12, 2022, 1:00pm UTC](https://community.piwik.pro/t/unique-count-order-id-miscalculation/1090/6 "2022-10-12T13:00:53Z")

</div>

Could you create the custom report (flat table) with mentioned dimensions for this day? If there are duplicates, we have the answer.

---

<div class="post-metadata">

**Author:** ![dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dave](https://community.piwik.pro/u/dave)\
**Post date:** [October 12, 2022, 1:22pm UTC](https://community.piwik.pro/t/unique-count-order-id-miscalculation/1090/7 "2022-10-12T13:22:36Z")

</div>

@Admin the first screenshot in my comment is a custom report (flat table) with channels customized & order id or do i misunderstand you?

Thxs

---

<div class="post-metadata">

**Author:** ![Admin](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Admin](https://community.piwik.pro/u/Admin)\
**Post date:** [October 12, 2022, 2:21pm UTC](https://community.piwik.pro/t/unique-count-order-id-miscalculation/1090/8 "2022-10-12T14:21:30Z")

</div>

I thought about Order ID dimension, not unique number of those 🙂 just to check one by one on small dataset

---

<div class="post-metadata">

**Author:** ![dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dave](https://community.piwik.pro/u/dave)\
**Post date:** [October 12, 2022, 2:42pm UTC](https://community.piwik.pro/t/unique-count-order-id-miscalculation/1090/9 "2022-10-12T14:42:33Z")

</div>

Ow ok 🙂

Showing 35 id’s

 ![1](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/a85cf288413c260dea119f46f53fa486078b3623.jpeg)

But if we don’t count the 6 empty one’s on top

 ![1](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/9364f8998d5f04854f71faa03e1e4971f9e67486.jpeg)

we have the correct number (29).

Any idea why these empty one’s are appearing in that report (and the aggregation) ?

---

<div class="post-metadata">

**Author:** ![Admin](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Admin](https://community.piwik.pro/u/Admin)\
**Post date:** [October 13, 2022, 2:06pm UTC](https://community.piwik.pro/t/unique-count-order-id-miscalculation/1090/10 "2022-10-13T14:06:03Z")

</div>

Ok, so we know what inflates the report. I’ll let the product team check that.

---

<div class="post-metadata">

**Author:** ![dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dave](https://community.piwik.pro/u/dave)\
**Post date:** [October 13, 2022, 2:19pm UTC](https://community.piwik.pro/t/unique-count-order-id-miscalculation/1090/11 "2022-10-13T14:19:23Z")

</div>

Thxs @Admin . Any idea’s on how to exclude the payment gateways?

---

<div class="post-metadata">

**Author:** ![Admin](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Admin](https://community.piwik.pro/u/Admin)\
**Post date:** [October 13, 2022, 2:20pm UTC](https://community.piwik.pro/t/unique-count-order-id-miscalculation/1090/12 "2022-10-13T14:20:11Z")

</div>

What do you mean exactly?

---

<div class="post-metadata">

**Author:** ![dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dave](https://community.piwik.pro/u/dave)\
**Post date:** [October 13, 2022, 2:31pm UTC](https://community.piwik.pro/t/unique-count-order-id-miscalculation/1090/13 "2022-10-13T14:31:13Z")

</div>

these here for example (under websites channel) are payment gateways

 ![3](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/fd335c9c0984a8a871c6a544bfcdccdf93d47173.jpeg)

So looks like they take a piece of the cake instead of the original source.

Thxs

---

<div class="post-metadata">

**Author:** ![Jarek](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/jarek/32/4408_2.png) [@Jarek](https://community.piwik.pro/u/Jarek)\
**Post date:** [October 14, 2022, 7:54am UTC](https://community.piwik.pro/t/unique-count-order-id-miscalculation/1090/14 "2022-10-14T07:54:40Z")

</div>

> [@dave](#):
>
> Any idea why these empty one’s are appearing in that report (and the aggregation) ?

Most likely you didn’t filter out other types of events so it’s aggregating the data for all events including those non-ecommerce that obviously have empty Order ID.  
Add filter to the report: “Event type” is “Ecommerce conversion”

---

<div class="post-metadata">

**Author:** ![dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dave](https://community.piwik.pro/u/dave)\
**Post date:** [October 14, 2022, 8:55am UTC](https://community.piwik.pro/t/unique-count-order-id-miscalculation/1090/15 "2022-10-14T08:55:40Z")

</div>

@Jarek that did the trick, thxs!

Any idea on how to exclude the payment gateways? Because we do get 2 source attribution now for 1 order:

 ![3](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/ed0a52fbeb0e9583e9a9882991b08a9c1973e2ca.jpeg)

---

<div class="post-metadata">

**Author:** ![Admin](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Admin](https://community.piwik.pro/u/Admin)\
**Post date:** [October 14, 2022, 9:51am UTC](https://community.piwik.pro/t/unique-count-order-id-miscalculation/1090/16 "2022-10-14T09:51:10Z")

</div>

What is your current implementation? Because it looks like you’re triggering the ecommerce order twice - on your site directly and then also maybe on the payment gateway side?
