feat(settings): swap Monitor promo for VPN#20404
feat(settings): swap Monitor promo for VPN#20404MagentaManifold wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the FxA Settings product promotion from Mozilla Monitor to Mozilla VPN, including UI assets/localization and corresponding Glean telemetry so impressions and CTA clicks are tracked under new VPN-specific event names.
Changes:
- Replace Monitor promo UI/content with VPN promo (new SVG, new Fluent strings, updated props/wiring in Settings pages/sidebar).
- Rename Glean metrics/events from
promo_monitor_*topromo_vpn_*across the shared metrics definitions and settings event recorder. - Update/adjust unit tests and Storybook stories to reflect the new promo and telemetry.
Reviewed changes
Copilot reviewed 14 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/fxa-shared/metrics/glean/web/index.ts | Renames event map entries from Monitor promo to VPN promo. |
| packages/fxa-shared/metrics/glean/web/event.ts | Minor generated import ordering change. |
| packages/fxa-shared/metrics/glean/web/accountPref.ts | Updates generated event metric definitions for VPN promo view/submit. |
| packages/fxa-shared/metrics/glean/fxa-ui-metrics.yaml | Renames/updates metrics definitions for VPN promo events. |
| packages/fxa-settings/src/lib/glean/index.ts | Routes new VPN promo event names to the correct Glean metric recorders. |
| packages/fxa-settings/src/lib/glean/index.test.ts | Updates telemetry plumbing tests for new VPN promo event names. |
| packages/fxa-settings/src/components/Settings/Sidebar/index.tsx | Switches sidebar promo prop/wiring from Monitor to VPN. |
| packages/fxa-settings/src/components/Settings/ProductPromo/vpn-text-logo.svg | Adds VPN logo asset used by the promo. |
| packages/fxa-settings/src/components/Settings/ProductPromo/monitor-text-logo.svg | Removes old Monitor logo asset. |
| packages/fxa-settings/src/components/Settings/ProductPromo/index.tsx | Replaces Monitor promo UI/logic with VPN promo content and CTA telemetry. |
| packages/fxa-settings/src/components/Settings/ProductPromo/index.test.tsx | Updates component tests for VPN content, link, and telemetry call. |
| packages/fxa-settings/src/components/Settings/ProductPromo/index.stories.tsx | Updates Storybook stories to use VPN promo props and labels. |
| packages/fxa-settings/src/components/Settings/ProductPromo/en.ftl | Replaces Monitor promo strings with VPN promo strings. |
| packages/fxa-settings/src/components/Settings/PageSettings/index.tsx | Wires VPN promo state and view telemetry into the settings page. |
| packages/fxa-settings/src/components/Settings/PageSettings/index.test.tsx | Updates settings page tests for VPN promo view telemetry behavior. |
| packages/fxa-settings/src/components/App/index.test.tsx | Updates mocked Glean shape to reference promoVpnView. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
53a71a4 to
7455b72
Compare
Because: * we wanna promote VPN This commit: * swaps Monitor promo for VPN Closes FXA-12815
7455b72 to
ee13a09
Compare
| * @param {'moz-account'} utmSource - The source of the traffic. | ||
| * @param {'bento' | 'sidebar' | 'settings' } utmTerm - The search term or keyword associated with the campaign. | ||
| * @param {'fx-desktop' | 'fx-mobile' | 'monitor' | 'monitor-free' | 'relay' | 'vpn' | 'get-free-scan-global' | 'get-year-round-protection-us' } utmContent - The specific content or product that the link is associated with. | ||
| * @param {'permanent' | 'settings-promo' | 'connect-device'} utmCampaign - The name of the marketing campaign. |
There was a problem hiding this comment.
Removed types here since they are already in the function signature
| ({ name }) => | ||
| name === MozServices.Monitor || name === MozServices.MonitorStage | ||
| const hasVpn = attachedClients.some( | ||
| ({ name }) => name === MozServices.MozillaVPN |
There was a problem hiding this comment.
We don't have a service name for VPN on stage... Should we add one? Not a big deal, except that QA won't be able to test this behavior on stage
There was a problem hiding this comment.
The service name on stage may be Firefox Private Network - Stage (from admin panel data), but I haven't tried to connect a stage client previously. Not sure if that's possible and if QA already has test steps.
| } | ||
|
|
||
| const VPN_PROMO_URL = constructHrefWithUtm( | ||
| LINK.VPN, |
There was a problem hiding this comment.
Similarly we don't have a link to the stage VPN website. (This does not affect functionality or QA testing at all, since QA doesn't have to sign in from this link)
There was a problem hiding this comment.
This is the stage link: https://www-dev.allizom.org/products/vpn/
| 'moz-account', | ||
| 'settings', | ||
| 'vpn', | ||
| 'promo' |
There was a problem hiding this comment.
utm params differ from the ticket description because we want to be somewhat consistent with bento menu's. These are what Ross gave me.
There was a problem hiding this comment.
promo instead of settings-promo?
vpomerleau
left a comment
There was a problem hiding this comment.
If we can set this up for QA validation on stage that would be ideal
| } | ||
|
|
||
| const VPN_PROMO_URL = constructHrefWithUtm( | ||
| LINK.VPN, |
There was a problem hiding this comment.
This is the stage link: https://www-dev.allizom.org/products/vpn/
| ({ name }) => | ||
| name === MozServices.Monitor || name === MozServices.MonitorStage | ||
| const hasVpn = attachedClients.some( | ||
| ({ name }) => name === MozServices.MozillaVPN |
There was a problem hiding this comment.
The service name on stage may be Firefox Private Network - Stage (from admin panel data), but I haven't tried to connect a stage client previously. Not sure if that's possible and if QA already has test steps.
| 'moz-account', | ||
| 'settings', | ||
| 'vpn', | ||
| 'promo' |
There was a problem hiding this comment.
promo instead of settings-promo?
Because
This pull request
Issue that this pull request solves
Closes: FXA-12815
Checklist
Put an
xin the boxes that applyHow to review (Optional)
Screenshots (Optional)
Please attach the screenshots of the changes made in case of change in user interface.
Other information (Optional)
Any other information that is important to this pull request.