Skip to content
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

Average price in ecommerce product view's total row shows sum instead of average (bug related to tracking product views) #16441

Open
RaphaelBergmann opened this issue Sep 15, 2020 · 10 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. c: Data Integrity & Accuracy c: Ecommerce For issues related to Ecommerce analytics within Matomo https://matomo.org/guide/reports/ecommerce/
Milestone

Comments

@RaphaelBergmann
Copy link

RaphaelBergmann commented Sep 15, 2020

This should be the average average price, not the sum of all average prices.
Matomo-Version: 3.14.1
MySQL-Version: 10.1.45-MariaDB-0+deb9u1
PHP-Version: 7.4.10
image

@tsteur tsteur added the Bug For errors / faults / flaws / inconsistencies etc. label Sep 15, 2020
@tsteur tsteur added this to the Priority Backlog (Help wanted) milestone Sep 15, 2020
@tsteur tsteur added Can't reproduce (yet) For issues that are reported by several people, but can't be reproduced reliably and need more data Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users. and removed Bug For errors / faults / flaws / inconsistencies etc. labels Sep 15, 2020
@tsteur tsteur removed this from the Priority Backlog (Help wanted) milestone Sep 15, 2020
@tsteur
Copy link
Member

tsteur commented Sep 15, 2020

Thanks for reporting this @RaphaelBergmann I tried to reproduce this in various of our sites but couldn't.

It also seems to work in our public demo https://demo.matomo.org/index.php?module=CoreHome&action=index&idSite=62&period=day&date=yesterday#?idSite=62&period=day&date=yesterday&segment=&category=Goals_Ecommerce&subcategory=Goals_Products

Can you maybe sort by average price and check if there are some high priced items in one of the 622 entries?

@RaphaelBergmann
Copy link
Author

I sorted the table, but there're no high priced items... We also have this issue here with sorting, which could refer to values being stored incorrectly in the DB (sth about number formatting, 12.345,67 €?). We have a very basic installation with just two plugins (FormAnalytics and MarketingCampaignsReporting) but disabling both of them doesn't fix our two issues. Or maybe it has something to do with MariaDB handling things slightly differently?
image

@tsteur
Copy link
Member

tsteur commented Sep 16, 2020

@RaphaelBergmann can you reproduce the issue on our demo? https://demo.matomo.org/index.php?module=CoreHome&action=index&idSite=62&period=day&date=yesterday#?idSite=62&period=day&date=yesterday&segment=&category=Goals_Ecommerce&subcategory=Goals_Products

If the sorting is an issue to not show the high prices maybe try to select in the bottom right "500 rows" and then you should be able to see all prices over two pages so it might be easier to find any high prices (if there are any).

@RaphaelBergmann
Copy link
Author

Your demo is running fine, I can't reproduce my issue there.
I checked for high prices again, but couldn't find any. Even checked the table matomo_log_conversion_item.
I thought about things that are specific to our shop: We have items that cost 0, where its average price would be 0 too, and perhaps its a 0 / NULL problem. Perhaps you could add a $0 item to your demo shop?
Also, we have 0 as well as negative revenues in matomo_log_conversion, e.g. if someone uses a voucher.

@tsteur
Copy link
Member

tsteur commented Sep 17, 2020

@RaphaelBergmann how are you tracking the ecommerce data?

Are you viewing the "Ecommerce orders" view there?
image

Is there any segment applied? I checked... generally the price is divided by the number of orders and I'm seeing a lot of products there but barely any orders so I'm assuming the problem is maybe that the average should only sum prices of products with orders vs in your case it might also sum products without orders. Might be related to tracking "product views".

@RaphaelBergmann
Copy link
Author

We use JavaScript for eCommerce tracking, e.g. this for product views:
image
and this for conversion tracking (on the "thankyou"-page):
image
My screenshots above all show the "Ecommerce Orders", not the "Abandoned Carts". I was already wondering about items with 0 purchases in the products list. However, the "Abandoned Carts" view shows the same behavior:
image
Applying a segment de- or increases the numbers as expected, but even without a segment, the average item prices are still summed.

@tsteur tsteur added Bug For errors / faults / flaws / inconsistencies etc. and removed Can't reproduce (yet) For issues that are reported by several people, but can't be reproduced reliably and need more data Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users. labels Sep 23, 2020
@tsteur
Copy link
Member

tsteur commented Sep 23, 2020

@RaphaelBergmann is there any chance we could get view access to this site to try and understand things better? It's still not quite clear to me how this happens. The tracking requests itself look good to me and shouldn't cause an issue. If that's possible, could you create a log in for us for hello at matomo.org and send the details to that email address?

@RaphaelBergmann
Copy link
Author

@tsteur yes, there is a chance - I just sent an email regarding this... Thanks so far :)

@RaphaelBergmann
Copy link
Author

@tsteur I just sent you the credentials :)

@tsteur
Copy link
Member

tsteur commented Sep 29, 2020

Thanks @RaphaelBergmann it appears to me that it is related to tracking product views. Like Matomo would some up all the product prices then device it by the number of orders. And it would also sum the price of products that had no order for example.

@tsteur tsteur added this to the Priority Backlog (Help wanted) milestone Sep 29, 2020
@mattab mattab changed the title Average price in ecommerce product view's total row shows sum instead of average Average price in ecommerce product view's total row shows sum instead of average (bug related to tracking product views) Dec 11, 2023
@mattab mattab added c: Ecommerce For issues related to Ecommerce analytics within Matomo https://matomo.org/guide/reports/ecommerce/ c: Data Integrity & Accuracy labels Dec 11, 2023
@mattab mattab modified the milestones: 5.5.0, 5.6.0 Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. c: Data Integrity & Accuracy c: Ecommerce For issues related to Ecommerce analytics within Matomo https://matomo.org/guide/reports/ecommerce/
Projects
None yet
Development

No branches or pull requests

3 participants