-
Notifications
You must be signed in to change notification settings - Fork 798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ensure woo analytics checkout event fires for checkout block #15223
Conversation
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: April 7, 2020. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code wise, this looks okay, I did not test.
While I approved based on the code alone, I am wondering what value this tracking will bring in differentiating between shortcode checkout and block checkout? As far as I can tell when we analyse the data from these fired events, we won't be able to distinguish between what event came from the shortcode checkout and what event came from the block checkout right? Is that important? |
- Hook custom action sent by checkout block render in Woo blocks plugin. + bonus lint comment
ab4ecf2
to
696c378
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. I rebased to address some unrelated issues with e2e tests that were causing Travis tests to fail here.
I'll let you make the final merge decision based on the discussion above though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Did not test.
@nerrad Yes that is important! And we ideally need to know that for all events, e.g. purchase (order completed) also. In #15127 we added props to all events for whether the store uses shortcodes or blocks for cart and checkout. The plan is to segment the events based on those props. FYI we've also added the woo version (#15028) so we can segment by that if needed. @jeherve I'm going to merge this :) |
… block: (#15223) - Hook custom action sent by checkout block render in Woo blocks plugin. + bonus lint comment
Cherry-picked to |
Fixes woocommerce/woocommerce-blocks#2031
Changes proposed in this Pull Request:
checkout_process
to a new hook fired in WooCommerce Blocks -woocommerce_blocks_enqueue_checkout_block_scripts_after
.This is currently hooked on
woocommerce_after_checkout_form
from WoCommerce Core. Originally we planned to fire this hook from checkout block PHPrender()
(#2038 - reverted), but this is not appropriate as extensions will likely render content/markup directly to output from the hook.Is this a new feature or does it add/remove features to an existing part of Jetpack?
*p7Ldg5-ru-p2
Testing instructions:
setup
Cash on delivery
payment method for easy checkout.return true;
at the start ofJetpack_WooCommerce_Analytics::shouldTrackStore()
.test
pixel.wp.com
.woocommerceanalytics_product_view
event.Optional:
Proposed changelog entry for your changes: