Google Analytics problem with added_to_cart event trigger

Hello,

I have a problem with the plugin: https://wordpress.org/plugins/woocommerce-google-analytics-integration/.

For the plugin to work properly, it must be: passing parameters to the added_to_cart event trigger.

My programmer added a fix to the file: /wp-content/themes/betheme/js/woocommerce.js. 

You can see the fix here:  /wp-content/themes/betheme/js/woocommerce.js?ver=27.6.4 (I will send the entire link privately)

In line 67 has been replaced: $(document.body).trigger('added_to_cart'); 

to

$(document.body).trigger('added_to_cart', [response.fragments, response.cart_hash, $thisbutton]);


This is required for the plugin Google Analytics for WooCommerce. If the fix is not implemented, after the template update, this part will be overwritten and the problem will return. Can you help me and fix the problem in the new update?

Comments

Sign In or Register to comment.