metamask-mobile icon indicating copy to clipboard operation
metamask-mobile copied to clipboard

feat: adds "data collection for marketing" toggles

Open jonybur opened this issue 9 months ago • 2 comments

Adds data collection for marketing toggles (and toasts/warnings) on:

  • Onboarding
  • Toast in Wallet
  • Settings page

Description

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/2525 https://github.com/MetaMask/MetaMask-planning/issues/2439 https://github.com/MetaMask/MetaMask-planning/issues/2440

Manual testing steps

Onboarding checkbox: Set isPastPrivacyPolicyDate to true in OptInMetrics

  1. Start a new account
  2. There should be a new checkbox that asks for marketing consent
  3. Checking it should set the marketing consent to true (check at Settings, Securty tab page)

Security tab:

  1. Go to Security tab
  2. When checking the "Data collection for marketing" to true, the "Participate in MetaMetrics" toggle should turn to true
  3. When checking "Participate in MetaMetrics" to false, "Data collection for marketing" should be set to false
  4. When "Participate in Metametrics" is true and "Data collection for marketing" is true, and the latter is set to false, a warning message should appear.

Toast: An already onboarded user will have the "dataCollectionForMarketing" value as null (neither true or false). This will trigger the toast.

  1. By clicking on "I accept", it should set the "Data collection for marketing" to true.
  2. By closing the toast or clicking on "No thanks", it should set the "Data collection for marketing" to false.

All of these actions should trigger subsequent Segment events.

Screenshots/Recordings

Before

After

https://github.com/MetaMask/metamask-mobile/assets/11148144/d0ebee90-38e1-4362-92ad-73728c82df72

Screenshot 2024-05-20 at 19 18 19 Screenshot 2024-05-20 at 19 19 30

Pre-merge author checklist

  • [ ] I’ve followed MetaMask Coding Standards.
  • [ ] I've completed the PR template to the best of my ability
  • [ ] I’ve included tests if applicable
  • [ ] I’ve documented my code using JSDoc format if applicable
  • [ ] I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.

Pre-merge reviewer checklist

  • [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

jonybur avatar May 20 '24 14:05 jonybur