Problem
The current get_session_replay_url() method returns a replay URL but provides no way to link to a specific moment in the replay. The SDK internally knows when the session recording started, but doesn't expose this as a computed timestamp in the URL.
Proposed Solution
Add an optional timestamp parameter. When set to 'now', the SDK should automatically calculate the elapsed seconds since the replay session started and append replay_timestamp to the generated URL:
// Current behavior (unchanged)
mixpanel.get_session_replay_url();
// => https://mixpanel.com/projects/replay-redirect?replay_id=...&distinct_id=...&token=...
// New: automatically compute timestamp for "right now"
mixpanel.get_session_replay_url({ timestamp: 'now' });
// => ...&replay_timestamp=1037.62
The SDK already tracks the session recording start time internally — this just exposes it as part of the URL.
Use Cases
- Error tracking: In an error handler, call
get_session_replay_url({ timestamp: 'now' })to get a link that jumps directly to the moment the error occurred
- Bug reports: Attach a replay URL that points to exactly when the user clicked "Report Bug"
- Alerting: Include deep-links in Slack/email alerts that jump straight to the relevant moment
- Support tools: Link support agents directly to the point where a user experienced an issue
Additional Context
The replay_timestamp query parameter already works in Mixpanel's UI URLs:
https://mixpanel.com/project/{id}/view/{id}/app/profile#distinct_id=...&replay_id=...&replay_timestamp=1037.6158
Problem
The
current get_session_replay_url()method returns a replay URL but provides no way to link to a specific moment in the replay. The SDK internally knows when the session recording started, but doesn't expose this as a computed timestamp in the URL.Proposed Solution
Add an optional timestamp parameter. When set to 'now', the SDK should automatically calculate the elapsed seconds since the replay session started and append replay_timestamp to the generated URL:
// Current behavior (unchanged)
mixpanel.get_session_replay_url();
// => https://mixpanel.com/projects/replay-redirect?replay_id=...&distinct_id=...&token=...
// New: automatically compute timestamp for "right now"
mixpanel.get_session_replay_url({ timestamp: 'now' });
// => ...&replay_timestamp=1037.62
The SDK already tracks the session recording start time internally — this just exposes it as part of the URL.
Use Cases
get_session_replay_url({ timestamp: 'now' })to get a link that jumps directly to the moment the error occurredAdditional Context
The replay_timestamp query parameter already works in Mixpanel's UI URLs:
https://mixpanel.com/project/{id}/view/{id}/app/profile#distinct_id=...&replay_id=...&replay_timestamp=1037.6158