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
feat: add server metametrics id #24479
Conversation
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. |
… feat-server-mmid
* Not using the Messaging System as we | ||
* do not want to tie this strictly to extension | ||
*/ | ||
metametrics: MetaMetricsAuth; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As comment mentioned, we need this to be used on Mobile. Seeing that the metametrics controller is still inside the extension, my guess is that mobile uses a different approach.
@@ -904,7 +923,8 @@ export default class MetaMetricsController { | |||
* @param {object} userTraits | |||
*/ | |||
_identify(userTraits) { | |||
const { metaMetricsId } = this.state; | |||
const { metaMetricsId, serverMetaMetricsId } = this.state; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Effected Segment Events:
- Identify
- TrackPage
- TrackEvent
Same SRP does not necessarily imply same user (best security-practices aside). How does this distinguish one user with a new device from e.g. one user selling their private keys (delivered through SRP) to another user with a separate device, or multiple users sharing a wallet by instantiating separate devices with the same SRP? Correlating separate users on separate devices under a single metrics ID seems problematic. |
We've had a recent discussion with the analytics team, we are now intending on using the same unique client metametrics, but just handling lineage on the back-end. |
We've recently decided that we won't be using the server metametrics ID on future events (only keeping a lineage) - so will close this PR & open a new one with the relevant changes. I'll make sure to link it.
This is a great point! I will discuss this with our team & the analytics team. Events now will still be unique, but need to keep this in mind when we store and manage the lineage/linked metametrics ids. |
I'm closing this PR as the feature has changed from discussing with the analytics team. A new PR (#24555) will be opened soon that does not use the server metametrics id on future events. |
Description
Uses an optional server metametrics ID. When set and provided, this ID will be the source of truth for metric events.
This provides better analytics for users who are logged in.
NOTE - this does not change anything really for existing users. This will (once our system enables this feature) will decrease the number of users (the same user on multiple devices).
We can have a larger discussion on this.
Related issues
Fixes:
Manual testing steps
N/A until this feature is enabled on our services.
Once this does go live:
Install 1:
userId
is sent.Install 2:
userId
is sent.userId
are now the sameScreenshots/Recordings
N/A
Before
N/A
After
N/A
Pre-merge author checklist
Pre-merge reviewer checklist