The quantity
in the checkout event tracking is misplaced as index value
#342
Labels
type: bug
The issue/PR is a confirmed bug.
Describe the bug:
Found this issue while working on #341.
In
trackCheckoutStep
function, it maps thecartItems
array togetProductFieldObject
.woocommerce-google-analytics-integration/assets/js/src/tracking.js
Lines 100 to 109 in 64e7dda
However, the second parameter of
getProductFieldObject
is used as the quantity tracking property rather than the array index.woocommerce-google-analytics-integration/assets/js/src/utils.js
Lines 12 to 17 in 64e7dda
This leads to `quantity' being incorrect.
Steps to reproduce:
checkout_progress
event tracking via the Console tab.Expected behavior:
The
quantity
in the event tracking should be the same as each product in the cart.Actual behavior:
The
quantity
in the event tracking is the array index value of the products in the cart.The text was updated successfully, but these errors were encountered: