matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.9k stars 2.65k forks source link

Ecommerce Tracker API: allow to update, or cancel, any order given its Order ID #10893

Open slawa-dev opened 7 years ago

slawa-dev commented 7 years ago

Related issue: https://github.com/piwik/piwik/issues/5292

I am trying to remove a canceled order with the Tracking API: http://developer.piwik.org/api-reference/tracking-api

Here is how the call looks like: https://mypiwik.com/piwik.php?idsite=7&rec=1&url=https%3A%2F%2Fmysite.com&apiv=1&idgoal=0&ec_id=1611210002&revenue=0&ec_st=0&ec_tx=0&ec_sh=0&ec_dt=0&token_auth=xxxxxxx

It appears in piwik

order

But even after I invalidate and re-process the past reports (http://piwik.org/faq/how-to/#faq_155) the statistics show revenue for the original order. stats

Am I missing something?

mattab commented 7 years ago

@s1awa in the visitor log for this day, do you still see the "cancelled order" or do you just see the new "order with revenue 0" ?

slawa-dev commented 7 years ago

@mattab I still see the original order and the log from when the API cancel command was called, but it is kind of incomplete. I think something might be missing in my API call. The log for the API call shows something was ordered but does not show an Ecommerce order with Revenue of 0 like the original order. It has "0 Action" And the original order in the log is still present with original revenue and not 0.

This is from The API call: order

This is the original order: order

mattab commented 7 years ago

Actually we wont be working on this one at this point

mattab commented 4 years ago

Renamed issue title to also include in the scope the "Update order" feature.

mattab commented 3 years ago

fyi: When tracking an order that has the same OrderID Matomo gives the following error: Invalid non-unique idsite/idorder combination (1, 000143), conversion was not inserted.

sigmet commented 3 years ago

I would also like to give a shout that "update e-commerce order" would be a very useful feature.

HartLarsson commented 2 years ago

fyi: When tracking an order that has the same OrderID Matomo gives the following error: Invalid non-unique idsite/idorder combination (1, 000143), conversion was not inserted.

i've exactly the same error too:

Error in Matomo (tracker): Invalid non-unique idsite/idorder combination (1, LETCPBUVH), conversion was not inserted.

MatomoForumNotifications commented 1 year ago

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/duplicate-tracking-of-ecommerce-orders/31789/5

timoostrich commented 4 months ago

I have exactly the same problem. Is there any workaround or do I have to live with wrong ecommerce data in matomo when an order was refunded?