From be807fa0c304c9c3725f8cc5c99fb19fd9d155bc Mon Sep 17 00:00:00 2001 From: Jakub Grzegorzewski Date: Thu, 7 Nov 2024 17:46:53 +0000 Subject: [PATCH 1/4] add replay url method --- pages/docs/tracking-methods/sdks/javascript.mdx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pages/docs/tracking-methods/sdks/javascript.mdx b/pages/docs/tracking-methods/sdks/javascript.mdx index e3d7cd5bc3..91f66331f8 100644 --- a/pages/docs/tracking-methods/sdks/javascript.mdx +++ b/pages/docs/tracking-methods/sdks/javascript.mdx @@ -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)). @@ -820,6 +819,15 @@ mixpanel.get_session_recording_properties() ``` Returns an empty object if there is no Replay in progress. +#### Get replay URL + +Provides a URL that links to the current replay in Mixpanel. This is useful for debugging purposes or for adding metadata to other platforms, such as support tickets. + +```javascript +mixpanel.get_session_replay_url() +``` +Returns null if there is no Replay in progress. + #### Example Scenarios | Scenario | Guidance | From 306f45783212862fd5d749d4eec65156af3997a5 Mon Sep 17 00:00:00 2001 From: Jakub Grzegorzewski Date: Thu, 7 Nov 2024 18:27:41 +0000 Subject: [PATCH 2/4] more context, reword --- pages/docs/tracking-methods/sdks/javascript.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pages/docs/tracking-methods/sdks/javascript.mdx b/pages/docs/tracking-methods/sdks/javascript.mdx index 91f66331f8..3fe7d03857 100644 --- a/pages/docs/tracking-methods/sdks/javascript.mdx +++ b/pages/docs/tracking-methods/sdks/javascript.mdx @@ -821,7 +821,9 @@ Returns an empty object if there is no Replay in progress. #### Get replay URL -Provides a URL that links to the current replay in Mixpanel. This is useful for debugging purposes or for adding metadata to other platforms, such as support tickets. +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. + +Useful for debugging purposes or for adding metadata to other platforms, such as support tickets. ```javascript mixpanel.get_session_replay_url() From 4dd6f1543299ecd1f1470200b847c72d44990d3d Mon Sep 17 00:00:00 2001 From: Jakub Grzegorzewski Date: Thu, 7 Nov 2024 12:41:18 -0600 Subject: [PATCH 3/4] Update pages/docs/tracking-methods/sdks/javascript.mdx Co-authored-by: teddddd --- pages/docs/tracking-methods/sdks/javascript.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pages/docs/tracking-methods/sdks/javascript.mdx b/pages/docs/tracking-methods/sdks/javascript.mdx index 3fe7d03857..3a29e411b3 100644 --- a/pages/docs/tracking-methods/sdks/javascript.mdx +++ b/pages/docs/tracking-methods/sdks/javascript.mdx @@ -821,9 +821,7 @@ 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. - -Useful for debugging purposes or for adding metadata to other platforms, such as support tickets. +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() From 9e9ca7998c3abd90c5415bc009b121953b4d2663 Mon Sep 17 00:00:00 2001 From: Jakub Grzegorzewski Date: Thu, 7 Nov 2024 18:45:45 +0000 Subject: [PATCH 4/4] sample output --- pages/docs/tracking-methods/sdks/javascript.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/docs/tracking-methods/sdks/javascript.mdx b/pages/docs/tracking-methods/sdks/javascript.mdx index 3a29e411b3..d0abe5d2fc 100644 --- a/pages/docs/tracking-methods/sdks/javascript.mdx +++ b/pages/docs/tracking-methods/sdks/javascript.mdx @@ -825,6 +825,7 @@ Returns a URL linking to the current replay in the Mixpanel UI. This URL is acce ```javascript mixpanel.get_session_replay_url() +// 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.