Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(runway): cherry-pick fix: ensure marketing consent is explicitly tracked as boolean #13093

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

runway-github[bot]
Copy link
Contributor

@runway-github runway-github bot commented Jan 21, 2025

Description

Currently, when users decline marketing consent during onboarding, the
has_marketing_consent property is not being set at all in the
analytics. This creates inconsistent data where we can't properly track
users who explicitly opted out of marketing.

This PR modifies the OptinMetrics component to explicitly set
has_marketing_consent to either true or false based on the user's
choice, ensuring we have complete analytics data for all user decisions
regarding marketing consent.

Related issues

Fixes: https://github.com/MetaMask/mobile-planning/issues/2086

Manual testing steps

  1. Fresh install the app
  2. Go through onboarding until you reach the "Help us improve MetaMask"
    screen
  3. Test both scenarios:
    • Accept metrics but decline marketing consent checkbox
    • Accept both metrics and marketing consent
  4. Verify in analytics that has_marketing_consent is properly set to
    false in first case and true in second case

Screenshots/Recordings

Before

Analytics data missing has_marketing_consent property when user
declines marketing consent

After

Analytics data showing explicit has_marketing_consent: false when user
declines marketing consent

Pre-merge author checklist

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. 7139a15

…y tracked as boolean (#12926)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

Currently, when users decline marketing consent during onboarding, the
`has_marketing_consent` property is not being set at all in the
analytics. This creates inconsistent data where we can't properly track
users who explicitly opted out of marketing.

This PR modifies the OptinMetrics component to explicitly set
`has_marketing_consent` to either `true` or `false` based on the user's
choice, ensuring we have complete analytics data for all user decisions
regarding marketing consent.

## **Related issues**

Fixes: MetaMask/mobile-planning#2086

## **Manual testing steps**

1. Fresh install the app
2. Go through onboarding until you reach the "Help us improve MetaMask"
screen
3. Test both scenarios:
   - Accept metrics but decline marketing consent checkbox
   - Accept both metrics and marketing consent
4. Verify in analytics that `has_marketing_consent` is properly set to
`false` in first case and `true` in second case

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

Analytics data missing `has_marketing_consent` property when user
declines marketing consent

### **After**

Analytics data showing explicit `has_marketing_consent: false` when user
declines marketing consent

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
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.
@runway-github runway-github bot requested a review from a team as a code owner January 21, 2025 12:16
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@sethkfman sethkfman added the Run Smoke E2E Triggers smoke e2e on Bitrise label Jan 23, 2025
@sethkfman sethkfman merged commit c70f4cd into release/7.39.0 Jan 23, 2025
36 of 39 checks passed
@sethkfman sethkfman deleted the runway-cherry-pick-7.39.0-1737461603 branch January 23, 2025 00:22
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Run Smoke E2E Triggers smoke e2e on Bitrise team-runway-bot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants