Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Two documented hooks aren't dispatched when expected #11472

Closed
martynmjones opened this issue Oct 26, 2023 · 2 comments
Closed

Two documented hooks aren't dispatched when expected #11472

martynmjones opened this issue Oct 26, 2023 · 2 comments
Assignees
Labels
block: checkout Issues related to the checkout block. block: product search Issues related to the Product Search block. type: bug The issue/PR concerns a confirmed bug.

Comments

@martynmjones
Copy link

Describe the bug

We recently moved the Google Analytics integration from WooCommerce Blocks to WooCommerce Google Analytics Integration. While working to update the tracking for GA4 I noticed that two of the hooks listed in the documentation don't actually exist in WooCommerce Blocks as far as I can tell:

  • experimental__woocommerce_blocks-checkout-render-checkout-form
  • experimental__woocommerce_blocks-product-search

To reproduce

Steps to reproduce the behavior:

  1. With GA Debugger enabled and Google Analytics configured, go to a page with the Product Search block
  2. Search and see that no search event is triggered
  3. Visit a checkout page powered by the Checkout block
  4. See no begin_checkout event is triggered

Expected behavior

The documented actions should be dispatched at the expected points of checkout and search.

Additional context

I appreciate these hooks are still behind an experimental_ prefix and so aren't production-ready but as the integration exists in WooCommerce Blocks and is currently outdated with Google having retired Universal Analytics I felt it worth reporting.

@opr
Copy link
Contributor

opr commented Oct 31, 2023

Hi @martynmjones thanks for raising this - looks like the experimental__woocommerce_blocks-checkout-render-checkout-form action was no longer dispatched following https://github.com/woocommerce/woocommerce-blocks/pull/4745/files - @mikejolley let's re-add it to https://github.com/woocommerce/woocommerce-blocks/blob/trunk/assets/js/blocks/checkout/inner-blocks/checkout-fields-block/frontend.tsx#L7 ?

Looks like the product search block is using the standard WordPress search block with a post type specific, so no longer using the one from our repo. Cc @danieldudzic as the FSE porter can you look into this and triage how long it will take to get the event firing again?

@opr opr added block: checkout Issues related to the checkout block. block: product search Issues related to the Product Search block. labels Oct 31, 2023
@mikejolley mikejolley self-assigned this Nov 2, 2023
@mikejolley
Copy link
Member

I've raised #11554 to take care of the checkout hook.

Logged a separate issue for the search one woocommerce/woocommerce#42145

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: checkout Issues related to the checkout block. block: product search Issues related to the Product Search block. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
Development

No branches or pull requests

3 participants