Skip to content

[JavaScript SDK] Session URL with current time #862

Answered by rosostolato
rosostolato asked this question in Q&A
Discussion options

You must be logged in to vote

I've just found a way to do it by creating a custom plugin:

export const getSessionURL = tracker.use(app => () => {
  const { timestamp } = app.getSessionInfo();
  const jumpTo = Date.now() - timestamp;
  return `${app.getSessionURL()}?jumpto=${jumpTo}`;
});

Is there an official or better way to do it? If not, this could be added to the SDK.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@estradino
Comment options

Answer selected by estradino
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants