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

Ecommerce: allow to track the same product SKU several times in an ecommerce order #10290

Open
4 tasks
mattab opened this issue Jul 12, 2016 · 0 comments
Open
4 tasks
Labels
Bug For errors / faults / flaws / inconsistencies etc. c: Data Integrity & Accuracy c: Documentation For issues related to in-app product help messages, or to the Matomo knowledge base. c: Ecommerce For issues related to Ecommerce analytics within Matomo https://matomo.org/guide/reports/ecommerce/ c: Tracking For issues related to getting tracking data into Matomo.

Comments

@mattab
Copy link
Member

mattab commented Jul 12, 2016

Ecommerce orders has a cart which contains Items, where an Item is defined with a Product SKUs, product name, product category, product price, product quantity.

Issue

The JS client wrongly implements the Ecommerce cart update method, and stores the items in a javascript array indexed by product SKUs: ecommerceItems[sku] = [ sku, name, category, price, quantity ]; -> this bug means orders with duplicate skus (eg. with different prices) will be missed.

Bug reported in #10252 (comment) by @Slowlearneruk 👍

Use case

Can I just present the case for the change before we write it off completely: The application I have written is a gambling game and the transactions that a user might make are individual bets. Consequently the price that they pay will vary according to what they want to gamble and there is nothing to stop them making the same bet twice over (with different stakes) if they wish. It therefore makes sense to record the individual bets as separate transactions otherwise I would lose information.

Consider as an alternative a site where the price of an item might vary (auction sites for instance) but it's SKU remains the same, one would want to represent separate purchases at different prices individually right?

Steps

  • Solve issue in JS client
  • Solve issue in PHP Tracking API client as well - here.
  • Announce in dev changelog the change
  • Contact authors of other SDKs who have implemented the ecommerce functions, to check they have implemented without the SKU indexing.
@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label Jul 12, 2016
@mattab mattab added this to the 2.16.2 milestone Jul 12, 2016
@mattab mattab modified the milestones: 3.0.0, 2.16.2 Jul 14, 2016
@mattab mattab assigned mattab and unassigned mattab Jul 14, 2016
@mattab mattab added c: Documentation For issues related to in-app product help messages, or to the Matomo knowledge base. c: Tracking For issues related to getting tracking data into Matomo. c: Ecommerce For issues related to Ecommerce analytics within Matomo https://matomo.org/guide/reports/ecommerce/ c: Data Integrity & Accuracy labels Dec 10, 2023
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: Documentation For issues related to in-app product help messages, or to the Matomo knowledge base. c: Ecommerce For issues related to Ecommerce analytics within Matomo https://matomo.org/guide/reports/ecommerce/ c: Tracking For issues related to getting tracking data into Matomo.
Projects
None yet
Development

No branches or pull requests

1 participant