Add Usage Tracking Checkbox #921
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
Usage Tracking
checkbox to the Plugin settings and Setup Wizard screens, that creators may opt in to, so we can later track the Plugins and Themes installed on sites with the Kit Plugin installed, to help improve compatibility and migrations.We can't automatically collect this without consent:
https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/#7-plugins-may-not-track-users-without-their-consent
We don't have an API endpoint to track this on the
wordpress
namespace, but we can add one later, and then start collecting some data.Testing
testEnableAndDisableUsageTrackingSetting
: Test that no PHP errors or notices are displayed on the Plugin's Setting screen when the Usage Tracking settings is unchecked, and that CSS is output on the frontend web site.testSetupWizardUsageTrackingSetting
: Test that the Setup Wizard > Usage Tracking setting is honored.Checklist