Hi,
The JS code for the add to cart buttons is in media/com_hikashop/hikashop.js in the "addToCart" function.
However, the best is to do it like that:
if(window.Oby) {
window.Oby.registerAjax(["cart.updated"],function(params){
gtag('event', 'añadir_carrito', {'event_category' : 'engagement','event_label' : 'añadir_carrito'});
});
}
That way, you'll trigger the Google Analytics event without even needing jQuery. And what's even better is that it will only trigger if the add to cart process works. If it doesn't, because the customer is asking to add more quantity in the cart than what's available in the stock for example, it won't trigger the event.