fix(analytics): fix user traits types to match Segment schema#27838
Open
skyc1e wants to merge 1 commit intoMetaMask:mainfrom
Open
fix(analytics): fix user traits types to match Segment schema#27838skyc1e wants to merge 1 commit intoMetaMask:mainfrom
skyc1e wants to merge 1 commit intoMetaMask:mainfrom
Conversation
Update security_providers from string to string array and has_marketing_consent from string to boolean to resolve Segment schema violations in identify calls.
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. |
Author
|
I have read the CLA Document and I hereby sign the CLA |
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
Found that
security_providersandhas_marketing_consenttraits are causing Segment schema violations because they're being sent as strings instead of the expected types.Fixed both:
security_providersnow returns['blockaid']/[]instead of'blockaid'/''has_marketing_consentnow returns actualtrue/falseinstead of'ON'/'OFF'Also updated the
UserProfileMetaDatainterface and tests to reflect this.Related Issue
Resolves #23970
Testing
Existing unit tests updated - all assertions now check for correct types.
No UI changes involved.
Note
Medium Risk
Changes the runtime shape of analytics identify traits (
security_providersandhas_marketing_consent), which could affect downstream analytics consumers expecting the previous string values, but is limited to metrics payload formatting.Overview
Fixes Segment identify trait type mismatches by sending correctly typed user profile traits.
security_providersis now emitted as a string array (e.g.['blockaid']/[]) andhas_marketing_consentis now a boolean (true/false), with theUserProfileMetaDatatypes and unit tests updated accordingly.Written by Cursor Bugbot for commit 1950255. This will update automatically on new commits. Configure here.