fix(analytics): fix user traits types for security_providers and has_marketing_consent#26792
Open
TanayK07 wants to merge 4 commits intoMetaMask:mainfrom
Open
fix(analytics): fix user traits types for security_providers and has_marketing_consent#26792TanayK07 wants to merge 4 commits intoMetaMask:mainfrom
TanayK07 wants to merge 4 commits intoMetaMask:mainfrom
Conversation
…marketing_consent Fix Segment schema violations by updating `security_providers` from string to string array (`['blockaid']` or `[]`) and `has_marketing_consent` from string to boolean across all call sites. Fixes MetaMask#23970
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. |
10 tasks
TanayK07
added a commit
to TanayK07/metamask-mobile
that referenced
this pull request
Mar 11, 2026
- Revert production code changes (analytics traits types) that belong to PR MetaMask#26792, not this hex-color-replacement PR - Move brandColor import before usage in FoxRiveLoaderAnimation test to avoid relying on babel import hoisting
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix Segment schema violations for user traits in identify calls:
traits.security_providers: was sendingstring('blockaid'/''), now sendsstring[](['blockaid']/[])traits.has_marketing_consent: was sendingstring('ON'/'OFF'), now sendsboolean(true/false)Updated all call sites across the codebase (not just the generator function) to ensure consistent trait types.
Changelog
CHANGELOG entry: null
Related issues
Fixes: #23970
Manual testing steps
Screenshots/Recordings
N/A — no UI changes, only analytics trait type fixes.
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Low risk: changes are limited to analytics
identify/trait payloads and corresponding tests, with no functional UI or state-management behavior changes expected beyond improved schema compliance.Overview
Fixes Segment user-trait schema violations by standardizing
security_providersto astring[](['blockaid']/[]) andhas_marketing_consentto aboolean(true/false) across all relevantidentify/addTraitsToUsercall sites.Updates the user profile metadata types and generator, plus adjusts associated unit tests to assert the new trait shapes.
Written by Cursor Bugbot for commit ae2cc5d. This will update automatically on new commits. Configure here.