Issue with tracking quantity changes in cart #312
Labels
priority: low
The issue/PR is low priority—not many people are affected or there’s a workaround, etc.
type: enhancement
The issue is a request for an enhancement.
Describe the bug:
At the moment we're tracking changes to product quantities in the cart (when using blocks) with a
change_cart_quantity
event. This isn't an event that's supported by UA or GA4.It could be used as a custom event but additional reporting would need to be set up in Google Analytics for that and there's no reference to it in the documentation so I'm unsure of its original purpose.
From what I can gather, it appears that the correct way to register the events would be to send
add_to_cart
orremove_from_cart
events with the number of items removed.Unfortunately, the current (experimental)
-cart-set-item-quantity
action gives us the total number of a product in the cart but not the difference. We'll likely either need to open a PR in blocks to change that or rely on the cart state instead but it will require further exploration.The text was updated successfully, but these errors were encountered: