-
Notifications
You must be signed in to change notification settings - Fork 801
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
Add tracking for Checkout Block additional fields #35418
Conversation
@@ -0,0 +1,5 @@ | |||
Significance: patch | |||
Type: other | |||
Comment: We updated how we track Cart/Checkout |
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 is because I based my PR on #35139
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks appearing at the bottom of this PR are passing or skipped. Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
return array( | ||
$field_key, | ||
$additional_fields_controller->get_field_location( $field_key ), | ||
$field['type'], | ||
$field['required'] ? '1' : '0', | ||
); | ||
}, |
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.
opted here for a flat array with no keys to simplify querying it.
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.
Do we know that this really does simplify querying it? Have we checked with data teams about this?
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.
I have not, but accessing array index is easier than object values, in python at least.
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.
Yeah I agree on that but now someone has to remember/document what order these fields are in, is that fine/usual in data? I'm not sure which is why I'm asking, if that's the way things work normally then I'm fine with it
509aebb
to
318f2a8
Compare
$fields_count = count( $additional_fields ); | ||
$fields_data = array_map( | ||
function ( $field_key, $field ) use ( $additional_fields_controller ) { | ||
return array( |
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.
We should collect the label here too.
} | ||
$data = array( | ||
'fields_count' => $fields_count, | ||
'fields' => wp_json_encode( $fields_data ), |
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.
Are we ok with collecting the value here, seems like we could be collecting PII of shoppers if we do this? For example if an "alternative contact number" field is added, should we really be collecting that info?
318f2a8
to
5a8ca44
Compare
03b7536
to
02e09e0
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.
Works Ok for me, I would recommend updating the testing instructions on this PR so you're not asking to check the filled values are visible (we removed them)
fe334f0
to
916d59e
Compare
This PR has been marked as stale. This happened because:
If this PR is still useful, please do a [trunk merge or rebase](https://github.com/Automattic/jetpack/blob/trunk/docs/git-workflow.md#keeping-your-branch-up-to-date) and otherwise make sure it's up to date and has clear testing instructions. You may also want to ping possible reviewers in case they've forgotten about it. Please close this PR if you think it's not valid anymore — if you do, please add a brief explanation. If the PR is not updated (or at least commented on) in another month, it will be automatically closed. |
This PR has been automatically closed as it has not been updated in some time. If you want to resume work on the PR, feel free to restore the branch and reopen the PR. |
This issue is part of woocommerce/woocommerce#42116 it adds custom fields tracking, mainly adding how many fields there are in checkout and post checkout, their names, requirement, location, type, and value for post checkout events.
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions: