-
Notifications
You must be signed in to change notification settings - Fork 808
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
Launchpad: verifying email sends appropriate launchpad track event #41624
Launchpad: verifying email sends appropriate launchpad track event #41624
Conversation
Other tasks record a `wpcom_launchpad_mark_task_complete` event when a task is detected as completed. Nothing is recording this for email verification though. We should record an event for this just like every other task. WPCOM fires a `wpcom_email_verification_complete` action when the user verifies. Email verification links send users to `signup.wordpress.com` not `public-api.wordpress.com`. So it must use a different authentication mechanism which is why I'm not trusting the `wp_get_current_user()` function call like the other tracks events do. Using the user ID from the action parameter is how other action handlers in WPCOM do it too.
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. Follow this PR Review Process:
Still unsure? Reach out in #jetpack-developers for guidance! |
Code Coverage SummaryCoverage changed in 1 file.
|
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.
Fixes Automattic/wp-calypso#99456
Proposed changes:
Other tasks record a
wpcom_launchpad_mark_task_complete
event whena task is detected as completed. Nothing is recording this for email
verification though. We should record an event for this just like
every other task.
WPCOM fires a
wpcom_email_verification_complete
action when theuser verifies. We hook into that action here in Jetpack.
Email verification links send users to
signup.wordpress.com
notpublic-api.wordpress.com
. So it must use a different authenticationmechanism which is why I'm not trusting the
wp_get_current_user()
function call like the other tracks events do. Using the user ID
from the action parameter is how other action handlers in WPCOM do
it too. See this example 36e9b-pb
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Tracking email verification task is the same sort of data we already track for other tasks. No changes
to our existing data usage.
Testing instructions:
signup.wordpress.com
redirect_to
URL out of the linknew URLSearchParams(new URL(' ... ').search).get('redirect_to')
(substituting the link for the ...)wpcom_launchpad_mark_task_complete
event