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

add replay url method #1600

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion pages/docs/tracking-methods/sdks/javascript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,6 @@ mixpanel.stop_session_recording()
```
This will have no effect if there is no replay data collection in progress.


#### Get replay properties

Use this method to get properties used to identify a replay that is taking place. Add the properties from this method to any events sent to Mixpanel that are not coming from the SDK (e.g. from a [CDP library](/docs/session-replay/session-replay-web#can-i-use-session-replay-with-a-cdp)).
Expand All @@ -820,6 +819,16 @@ mixpanel.get_session_recording_properties()
```
Returns an empty object if there is no Replay in progress.

#### Get replay URL

Returns a URL linking to the current replay in the Mixpanel UI. This URL is accessible only by authenticated users with the necessary permissions for the Mixpanel project. This is useful for debugging purposes or for adding metadata to other platforms, such as support tickets.

```javascript
mixpanel.get_session_replay_url()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add sample output like we do above for get_session_recording_properties()?

// https://mixpanel.com/projects/replay-redirect?replay_id=19307d78e24394fe15-0cd98d8fd9ad1d-1f525636-4b9600-19307d78e28194fe15&distinct_id=123&token=my-project-token
```
Returns null if there is no Replay in progress.

#### Example Scenarios

| Scenario | Guidance |
Expand Down