[JavaScript SDK] Session URL with current time #862
Answered
by
rosostolato
rosostolato
asked this question in
Q&A
-
Is there a way to get the current time for the current session URL using the Javascript SDK? I need to produce an URL with |
Beta Was this translation helpful? Give feedback.
Answered by
rosostolato
Dec 6, 2022
Replies: 2 comments 1 reply
-
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. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
estradino
-
@estradino created PR #865 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've just found a way to do it by creating a custom plugin:
Is there an official or better way to do it? If not, this could be added to the SDK.