WooCommerce tracking requirements

The table below shows the functions and hooks that are essential for WP Full Picture to track WooCommerce. Some plugins and themes may change or not include them.

  • Teasers must use an action hook: woocommerce_before_shop_loop_item
  • Every teaser must be wrapped in <li> element
  • Add to cart button must have a class .add_to_cart_button OR .ajax_add_to_cart
  • Teasers must use an action hook: woocommerce_widget_product_item_end
  • Every teaser must be wrapped in <li> element
  • Mini cart widget must use a hook woocommerce_after_mini_cart
  • Products in mini cart must use a filter woocommerce_cart_item_name
  • The “x” icon for removing items from cart must match selector a.remove.remove_from_cart_button
  • Cart must use a hook woocommerce_before_cart_contents
  • Items in cart must use a filter woocommerce_cart_item_name
  • Products must use a hook woocommerce_after_add_to_cart_button
  • Add to cart button must have a class .add_to_cart_button OR .ajax_add_to_cart
  • Single products must use a form element with class .cart
  • Variable products must use a form element with classes .cart and .variations_form
  • Grouped products must use a form element with class .grouped_form
  • Grouped products must use a filter woocommerce_grouped_product_list_column_label
  • Every grouped product should have a class .woocommerce-grouped-product-list-item

Checkout must use elements which match classes

  • .billing_email and .wp-block-woocommerce-checkout (for blocks)
  • .email and form.woocommerce-checkout (for classic checkout)
  • The link adding a product to a wishlist must be right after the “add to cart” button. Other placements may not work correctly.
  • The CSS selector of the link which adds products to a wishlist must be defined in the WooCommerce Tracking settings page
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments