wp-rocket
wp-rocket copied to clipboard
As a Product Manager, I want to dynamically control the options that should be tracked in MixPanel
Context
This is a follow-up for https://github.com/wp-media/wp-rocket/issues/7436 In the first version, we implemented tracking for a specific option. We want now to dynamically control the list of options to track, through dynamic lists.
Dependencies
https://github.com/wp-media/wp-rocket/issues/7436
Expected behavior
- Add a section in the WP rocket Back End service about MixPanel option tracking, allowing to set a list of options.
- In the plugin, download frequently this new dynamic list and use it to filter the option updated that should trigger an event to MixPanel
At first, the dynamic list will only contains the Preload Fonts option. From #7436: if multiple options are changed at once, one event must be sent for each tracked option. If possible, it would be great to generate a "form_submission_id" allowing to track which events are coming from the same form submission.
Acceptance Criteria
Non-regression:
- Install WP Rocket. keep the data tracking opted-out (by default)
- Enable (or disable) the option "Preload Fonts". No events must be sent.
- Activate the data tracking.
- Enable (or disable) the option "Preload Fonts". Events must be sent to MixPanel.
- The event must be linked to the MixPanel user with the email on the WP Rocket licence.
- The properties of the events must be as expected.
- Enable (or disable) another option. No events must be fired.
- Enable (or disable) "Preload fonts" as well as another option, in the same form submission. Only one event for Preload fonts must be sent.
New ACs (following up on the above steps):
- add a new option to the backend (let's say Self-hosted Google fonts).
- update the plugin dynamic list
- enable/disable both the Preload Fonts & the Self-hosted Google Fonts in the same form submission. 2 events must be sent to MixPanel.
- enable/disable both the Preload Fonts & the Self-hosted Google Fonts, and a 3rd option in the same form submission. 2 events must be sent to MixPanel.
- opt-out of the data tracking
- enable/disable both the Preload Fonts & the Self-hosted Google Fonts, and a 3rd option in the same form submission. no events must be sent to MixPanel.