New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overall Product Revenue calculated wrong #15981
Comments
Look like all other values except the product revenue look good. Interestingly the revenue for most other products looks good too? Looking at the code the revenue should come from Is there maybe anything different about this product? Are you looking here at a daily view or weekly or monthly? In case you are looking at weekly or monthly, are some of the daily reports correct? Or all of them? Can you see the wrong data also for other periods? |
The values besides the overall revenue are ok, but it's not only that particular product that is effected. Basically all products are affected of this behaviour where the average quantity is bigger than 1, while products where the average order quantity equals one show the correct overall revenue. You can easily check that by multiplying average price and unique purchases - the result of this multiplication matches the correct revenue for the product. The screenshot above is from the monthly report, but this bug also occurs in the other report periods. |
That is actually caused by the way the values are currently calculated and will only occur if you have the same product tracked with different prices. Product Revenue = sum of quantity * price of each order So assuming we have this product orders
That will result in this values
As you can see there is actually no way to calculate the @beamylake When you track a product with a quantity bigger than one, do you send the price for a single product, or the sum for all? |
I'm sorry but I'm a bit confused, please help me out. When I sell a product 344 times with a price of € 4,99 (red marked in my first post), how does Matomo come up with an overall product revenue of € 11.107,70 ? That would be a price per unit of about € 32, which is way too high for that product. Imho the overall product revenue should be 344 x € 4.99 which is the correct number of € 1.716,56 Regarding your question, I will check that and let you know. |
That was just en example why the value can differ if you product price changes. But looking at the numbers of your report I would actually assume that you send the sum for all products instead of the price of a single one. Your average price is reported as |
Good morning, I've got feedback from our devs and, as you suspected, it was the overall price that has been tracked and not the particular product price. So the error was clearly on our side. Thanks for your patience and for pushing us in the right direction! |
Hello,
we've encountered a suspected bug in the ecommerce reporting section:
When looking at the monthly totals, it seems that the total revenue of a product is wrongly calculated if the average product quantity is bigger than 1. And the bigger the average product quantity is the bigger the error margin gets for this particular product.
When you take a look at the red marked example in the screenshot:
The product has a price of € 4,99.
This price multiplied with 344 (the quantity) gives a total revenue of € 1.716,56, which is the correct number. When you take the average price (€ 22,89) and multiply it with the number of unique purchases (75) the result is 1.716,75 which we also consider correct (disregarding the rounding margin).
But Matomo calculates the product revenue as € 11.107.70 - a number which we don't know, where it derives from.
We've checked the tracking input to Matomo and the prices were tracked correctly. That's why we suspect that Matomo somehow miscalculates the totals.
We are running Matomo 3.13.5 - if you need any further information please let me know!
Thanks a lot in advance!
The text was updated successfully, but these errors were encountered: