TAGGRS / taggrs-wordpress

Easily integrate your Wordpress/Woocommerce site with TAGGRS Server Side Tracking!
Other
5 stars 3 forks source link

'added_to_cart' event does not upload a product's categories #3

Closed BruceKristelijn closed 6 months ago

BruceKristelijn commented 6 months ago

The "add_to_cart" event is called in two ways:

The JS Event however misses the product categories: image

BruceKristelijn commented 6 months ago

The reason this happens is because of this: var product_category = $thisbutton.data('category');

The button does not contain the required information. This information can be retrieved from the parent "li" element.