WooCommerce tracking requirements
WP Full Picture is set up to track stores that use standard WooCommerce hooks and HTML. Some plugins and themes may however either not use them or highly modify them. In such case, tracking will not work.
The table below lists the functions and hooks that your website must have so that WP Full Picture can track WooCommerce.
Required hooks and features
Functions and hooks that are present in all WP installations were omitted. This also includes WooCommerce blocks for block themes and full-site editing feature.
Usage | Requirement |
---|---|
Server-side tracking | Rest API |
Tracking interactions with product teasers in product categories and tags, related products and “You may also like” sections | woocommerce_before_shop_loop_item (action hook) |
Interactions with product teasers in widgets | woocommerce_widget_product_item_end (action hook) |
Interactions with products in mini-cart widget | woocommerce_after_mini_cart (action hook) woocommerce_cart_item_name (action filter) |
Interactions with cart | woocommerce_before_cart_contents (action hook) woocommerce_cart_item_name (action filter) |
Interactions with products on product pages | woocommerce_after_add_to_cart_button (action hook) |
Interactions with grouped products on product pages | woocommerce_grouped_product_list_column_label (action filter) |
Checkout tracking (checkout added with shortcode) | woocommerce_before_checkout_form (action hook) |
Required HTML
Usage | CSS classes of required HTML elements |
---|---|
Checkout tracking | .wp-block-woocommerce-checkout form.woocommerce-checkout |
Add to cart (all uses) | .add_to_cart_button OR .ajax_add_to_cart |
Add to cart single products | form.cart |
Add to cart variable products | form.cart.variations_form |
Add to cart grouped products | form.grouped_form .woocommerce-grouped-product-list-item |
Remove items from mini-cart widget | a.remove.remove_from_cart_button |
Adding to a wishlist | Defined in the WooCommerce Tracking settings |