wp-rocket icon indicating copy to clipboard operation
wp-rocket copied to clipboard

As a Product Manager, I want to track when users change a setting in WP Rocket to understand feature adoption

Open MathieuLamiot opened this issue 6 months ago • 3 comments

Context

As part of the WP Rocket tracking plan (https://group-one.atlassian.net/wiki/spaces/~71202006d0112a51174dabb745d09c73b9018c/pages/33899479261/WP+Rocket+user-events+tracking), we want to know when a user enable or disable an option. This should be done in MixPanel, according to user consent.

Dependencies

@DahmaniAdame to define the rework we need to do on the Rocket Analytics popup, to first properly explain to users what we will be tracking.

Expected behavior

When a tracked* WP Rocket option is modified (enabled or disabled), if the data tracking consent is opted in, then an event "WPM Option changed" must be sent to MixPanel with the following properties:

  • brand: "WP Media"
  • product: "WP Rocket"
  • context: "wp_plugin"
  • option_name (string): name of the option that was changed
  • previous_value (string): activated/deactivated
  • new_value (string): activated/deactivated

The even must be identified to the MixPanel user with the (hashed) email of the WP Rocket licence.

*tracked options: We don't want to track all options being changed, to avoid unnecessary events on MixPanel and overuse. As a first step, we will hardcode a list of options that we want to track. If the changed option is not one of them, no events must be sent. To begin with, we will only track the "Preload Fonts" option (from 3.19).

In the future, 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

  • 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.

MathieuLamiot avatar Jun 04 '25 13:06 MathieuLamiot

Do we also want to send the hashed domain?

remyperona avatar Jun 04 '25 19:06 remyperona

@remyperona Yes, good idea. Let's add it 👍

MathieuLamiot avatar Jun 04 '25 21:06 MathieuLamiot

Checklist:

  • [ ] AC is working
  • [x] single ajax sent when enable/disable analytics

Mai-Saad avatar Jun 12 '25 10:06 Mai-Saad