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

fix: ensure marketing consent is explicitly tracked as boolean #12926

Merged
merged 11 commits into from
Jan 20, 2025

Conversation

jonybur
Copy link
Contributor

@jonybur jonybur commented Jan 10, 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.

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.

@jonybur jonybur added the Run Smoke E2E Triggers smoke e2e on Bitrise label Jan 10, 2025
Copy link
Contributor

github-actions bot commented Jan 10, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 87e744c
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/a011f1e6-bdcd-4020-acba-ec6c58ae6666

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@jonybur jonybur added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Jan 10, 2025
Copy link
Contributor

github-actions bot commented Jan 10, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 82199aa
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/3d9b1e0d-eb2a-4f14-93f1-35f8647be175

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@jonybur jonybur marked this pull request as ready for review January 10, 2025 16:05
@jonybur jonybur requested a review from a team as a code owner January 10, 2025 16:05
@jonybur jonybur added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Jan 10, 2025
Copy link
Contributor

https://bitrise.io/ Bitrise

🔄🔄🔄 pr_smoke_e2e_pipeline started on Bitrise...🔄🔄🔄

Commit hash: 38f1ecc
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/ffc8ed1e-d90c-4005-8ef6-406fc7cfa2c2

Note

  • This comment will auto-update when build completes
  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@jonybur jonybur added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Jan 10, 2025
Copy link
Contributor

github-actions bot commented Jan 10, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 6954b0c
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/1c07d00a-8877-4bb6-874b-d3a796bab16d

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@jonybur jonybur added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Jan 13, 2025
Copy link
Contributor

@NicolasMassart NicolasMassart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@jonybur jonybur added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Jan 16, 2025
Copy link
Contributor

github-actions bot commented Jan 16, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 1bb2e93
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/0186e5ed-889f-48e1-83c3-75a7ea52b2bc

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@jonybur jonybur enabled auto-merge January 17, 2025 15:15
@jonybur jonybur added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Jan 17, 2025
Copy link
Contributor

github-actions bot commented Jan 17, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: b6b8170
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/1b3e6708-0793-4f92-b582-1974f5925eb4

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@jonybur jonybur added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Jan 20, 2025
@jonybur jonybur added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Jan 20, 2025
Copy link
Contributor

github-actions bot commented Jan 20, 2025

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: a107c34
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/190cf16e-d978-4b3a-bc9a-4c7b9981c76f

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@jonybur jonybur added this pull request to the merge queue Jan 20, 2025
Merged via the queue into main with commit 7139a15 Jan 20, 2025
42 checks passed
@jonybur jonybur deleted the marketing-consent-tracking-bug branch January 20, 2025 15:21
@github-actions github-actions bot locked and limited conversation to collaborators Jan 20, 2025
@metamaskbot metamaskbot added the release-7.40.0 Issue or pull request that will be included in release 7.40.0 label Jan 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-attribution release-7.40.0 Issue or pull request that will be included in release 7.40.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-wallet-ux
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants