Obtaining a Visitor's SessionID

Each recorded session within SessionCam has a unique identifier called a Session ID.

Passing this Session ID into your other tools (for example an analytics tool) will allow you to jump into SessionCam to watch a recording directly from that analytics tool.

You can obtain a user's Session ID using the following JavaScript function, This function will check for the SessionId being available before logging the SessionId:

 <script type="text/javascript">
// <![CDATA[
window.reportSessionId = function() {
if(window.sessionCamRecorder) {
sessionCamRecorder.subscribe("session/started", function() {
//You can edit the line below to send obj.sessionId to another system
console.log('Recording has now started. The sessionId is ' + window.sessionCamRecorder.sessionId());
//If you wanted to send a full replay link you would use something similar to the line below
console.log('The replay link is https://console.sessioncam.com/Console/Recordings/PlaybackSession?sessionId=' + window.sessionCamRecorder.sessionId());
}); }
else
window.setTimeout(window.reportSessionId, 100);
};
window.reportSessionId();

// ]]>
</script>

This function returns the GUID Session ID and the start time of the session as a comma separated string, You can use the Session ID to develop links between SessionCam and third party applications, such as analytics packages.

To view playback of a session for which you have a Session ID, simply use the following URL (note - you will need to be logged into the SessionCam console): 

https://console.sessioncam.com/Console/Recordings/PlaybackSession?sessionId=xxxxxxx

The Session ID is available any time after the SessionCam snippet has initialized on the user's browser. The above tag should be placed before the SessionCam tag itself on the page.