sylius-google-tag-manager-enhanced-ecommerce-plugin icon indicating copy to clipboard operation
sylius-google-tag-manager-enhanced-ecommerce-plugin copied to clipboard

Handle clear cart button

Open kgonella opened this issue 2 years ago • 3 comments

In case of the customer use the clear button, the removeFromCart event should be sended for all product that were in the cart.

kgonella avatar Jan 18 '22 13:01 kgonella

Isn't Sylius already internally sending the cart remove event multiple times? If not, that would be good anyway in Sylius I think.

stefandoorn avatar Jan 18 '22 14:01 stefandoorn

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 avatar Jan 18 '22 14:01 kgonella

@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.

stefandoorn avatar Jun 28 '23 10:06 stefandoorn