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

Calculate session replay percentage based on stable identifier #461

Open
nightpool opened this issue Dec 17, 2024 · 1 comment
Open

Calculate session replay percentage based on stable identifier #461

nightpool opened this issue Dec 17, 2024 · 1 comment

Comments

@nightpool
Copy link

Hi all! Right now we're using record_sessions_percent to roll out session replay to a small percentage of our users. However, due to the way that Mixpanel uses Math.random to calculate a page view-level eligibility for session replay, it's hard to compare replays in a funnel or between different sessions by the same user.

Instead, Mixpanel should hash the user's distinct_id to calculate a stable identifier that can be used for determining whether the user is in the "record sessions" cohort, so that replays from the same user can be analyzed together.

@tdumitrescu
Copy link
Member

This is largely a product decision (whether you want user-based sampling or not), but we are indeed planning to offer some more complete controls over sampling in future releases. In the meantime, if you want user-based sampling, the recommended workaround is to write your own sampling logic and then initialize with record_sessions_percent set to either 0 or 100 based on your determination of whether the current user falls in sample or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants