Hello,
We have performed additional tests comparing WoodMart with Storefront, and we have now found a clear difference that appears to explain the issue.
We tested the same WooCommerce installation, the same Google Analytics plugin configuration, and the same B2B customer conditions.
With Storefront active, on a single product page:
window.ga4w.data.events
returns:
[“view_item_list”, “view_item”]
Screenshot 1 attached: Storefront showing both view_item_list and view_item.
With WoodMart active, on a single product page:
window.ga4w.data.events
returns only:
[“view_item_list”]
The view_item event is missing.
Screenshot 2 attached: WoodMart showing only view_item_list.
We also tested the standard WooCommerce hook:
woocommerce_after_single_product
using a temporary test that outputs:
<!– DHG_TEST_AFTER_SINGLE_PRODUCT –>
With Storefront, the hook is executed correctly and the test output appears in the page source.
Screenshot 3 attached: page source with Storefront showing DHG_TEST_AFTER_SINGLE_PRODUCT.
With WoodMart, the same test output does not appear, indicating that woocommerce_after_single_product is not being executed in the WoodMart single-product template.
Since the official WooCommerce Google Analytics Integration relies on this hook for the view_item event, this appears to explain why view_item is generated with Storefront but not with WoodMart.
Could you please review why the standard woocommerce_after_single_product hook is not being executed with WoodMart and advise how we can restore it?
Thank you.
Attachments:
You must be
logged in to view attached files.