sylius-google-tag-manager-enhanced-ecommerce-plugin
sylius-google-tag-manager-enhanced-ecommerce-plugin copied to clipboard
Handle clear cart button
In case of the customer use the clear button, the removeFromCart
event should be sended for all product that were in the cart.
Isn't Sylius already internally sending the cart remove event multiple times? If not, that would be good anyway in Sylius I think.
I don't think so. Single item add or remove events are dispached in the OrderItemController. The clear is done in the OrderController::clear() Action. It dispached the remove event on the order directly.
@kgonella Would you be able to submit a PR? :-) I think with the current GA4 and mainly backend listeners, it should be easier than it used to be with frontend tracking.