mozilla / fx-private-relay-add-on

Companion add-on for Firefox Relay. Keep your email safe from hackers and trackers. Make an email alias with one click, and keep your address to yourself.
https://addons.mozilla.org/en-US/firefox/addon/private-relay
Mozilla Public License 2.0
70 stars 15 forks source link

MPP-1851 Collect CSAT metrics from new add-on in tool bar menu #490

Closed lloan closed 1 year ago

lloan commented 1 year ago

This PR fixes MPP-1851

New feature description

Options: Very Dissatisfied, Dissatisfied, Neutral, Satisfied, Very Satisfied

Logic:

-allow user to dismiss banner and do not show until next period of time: -Show after a user has been a Relay premium user for one week: It’s okay to show the banner if a user dismissed it as a free user or answered the questions as a free user, only show after they’ve been a premium user for one week. -Show after a user has been a Relay premium user for 1 month -After the first month, then show the banner every 3 months

Free users:

-allow user to dismiss banner and do not show until next period of time:

-Show after a user has been a RElay user for 24 hours

Show after a user has been a Relay free user for one week

-Show after a user has been a Relay free user for 1 month

-After the first month, then show the banner every 3 months

Each level of satisfaction + tier has its own survey link.

Figma: https://www.figma.com/file/NP5tLeIFJeHC5HvaqpLQdp?node-id=144:5069#188339327

Acceptance Criteria

Screenshot (if applicable)

Not applicable.

How to test

You should be able to see the CSAT survey banner if you modify the appropriate key in your extension storage.

image

Depending on your profileID, yours will look different. I set the value to 1693440000000 which is the equivalent of August 31st, 2023. Which triggers the CSAT banner to show up as the first time seen first_seen_# is now 7+ days ago.

You can test the dismissal of the banner, closing banner should not perm. remove it, but dismissing it intentionally should make it go away until the next cycle (7 days, 30 days, 90 days and every 90 days there after). You can also test that the correct URLS are being generated when choosing different satisfaction levels.

          // 0-4: Satisfaction levels
          // very dissatisfied, dissatisfied, neutral, satisfied, very satisfied
          free: {
            0: "https://survey.alchemer.com/s3/6665054/7a7bd09a1f5c", // Very Dissatisfied
            1: "https://survey.alchemer.com/s3/6665054/81559277cf08", // Dissatisfied
            2: "https://survey.alchemer.com/s3/6665054/bfd35b01db10", // Neutral
            3: "https://survey.alchemer.com/s3/6665054/ba5457f41c63", // Satisfied
            4: "https://survey.alchemer.com/s3/6665054/8a601f0da387", // Very Satisfied
          },
          premium: {
            0: "https://survey.alchemer.com/s3/6665054/7d42fcea7798", // Very Dissatisfied
            1: "https://survey.alchemer.com/s3/6665054/36db655e146f", // Dissatisfied
            2: "https://survey.alchemer.com/s3/6665054/865f28c68bd4", // Neutral
            3: "https://survey.alchemer.com/s3/6665054/4f963f89e498", // Satisfied
            4: "https://survey.alchemer.com/s3/6665054/2c8b192bd4c7", // Very Satisfied

There are 4 metrics here as well:

Checklist

lloan commented 1 year ago

@maxxcrawford I just pushed an update for the external survey link. I was doing a demo for Relay team and it wouldn't take me to the correct URL for the survey. It should do so now. In case it was doing that for you before.

lloan commented 1 year ago

Added a 4th metric per @maxxcrawford:

Here are the 4 events fired