stefandoorn / sylius-google-tag-manager-enhanced-ecommerce-plugin

Enhanced Ecommerce implementation through Google Tag Manager for Sylius eCommerce Platform
MIT License
35 stars 19 forks source link

Handle clear cart button #136

Open kgonella opened 2 years ago

kgonella commented 2 years ago

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

stefandoorn commented 2 years ago

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

kgonella commented 2 years ago

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.

stefandoorn commented 1 year ago

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