I am using this code to handle the events on woocommerce remove from cart. JS :
removeFromCartEventBind() {
document.body.addEventListener("click", (e) => {
const classList = e.target.className.split(" ");
const removeClasses = ["remove", "remove_from_cart_button"];
if (removeClasses.some((el) => classList.includes(el))) {
this.removeFromCart();
}
});
}
And I am calling the removeFromCart() function there.
removeFromCart() {
//Pushing data to tracker
console.log("Remove from Cart Called");
}
Are there any similar JS Events to track the other events like : CartView, Checkout, Order, Search ..etc.