-
Notifications
You must be signed in to change notification settings - Fork 809
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
Forms: Add tracking for plugin installs #41732
base: trunk
Are you sure you want to change the base?
Conversation
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
return ( | ||
<p className="jetpack-contact-form__crm_text jetpack-contact-form__integration-panel"> | ||
<em> | ||
{ __( | ||
'You already have the Jetpack CRM plugin installed, but it’s not activated.', | ||
"You already have the Jetpack CRM plugin installed, but it's not activated.", |
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.
These changes are unrelated to the PR, but were required by our commit checks.
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! |
@@ -81,7 +95,7 @@ const CreativeMailPluginIsActive = () => { | |||
return ( | |||
<p> | |||
<em> | |||
{ __( 'You’re all setup for email marketing with Creative Mail.', 'jetpack-forms' ) } | |||
{ __( "You're all setup for email marketing with Creative Mail.", 'jetpack-forms' ) } |
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.
These changes are unrelated to the PR, but were required by our commit checks.
Code Coverage SummaryCoverage changed in 2 files.
Full summary · PHP report · JS report Add label
I don't care about code coverage for this PR
|
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.
The changes look good from my end.
Thanks for adding these events
Fixes #2254
Replaces #41695 and #41705
Proposed changes:
Adds Tracks events when users click to install or activate either Jetpack CRM or Creative Mail from the contact form block sidebar. I copied the pattern we use for tracking Stripe clicks in the payment button blocks (see here).
In one of the other PRs @enejb suggested avoiding code duplication by putting the tracking in the installAndActivatePlugin method. But (a) we'd still need to add the changes twice in that method and the activatePlugin method and (b) we need to know the source of a plugin install or activation, not just that it happened.
My other approach also didn't do (b), which is why I've prepared this this as an alternative.
Other information:
Jetpack product discussion
None.
Does this pull request change what data or activity we track or use?
Yes.
Testing instructions:
Preparation:
Test:
jetpack_form_crm_plugin_install_click
Tracks event is fired.jetpack_forms_creativemail_plugin_install_click
Tracks event is fired.jetpack_forms_crm_plugin_activate_click
andjetpack_forms_creativemail_plugin_activate_click
Tracks events iare fired.