FS('getSession') returns a clickable URL to the current session recording. Use it to link FullStory sessions back into other tools — analytics, error tracking, customer support — so a teammate can jump from their tool of choice straight to the matching replay.
When it returns a value
FS('getSession') returns null until FullStory has started a session. After init() resolves and the first capture event fires, the URL is available.
In React, read it inside an effect after a tick or two. The safest pattern is to call it just before you push it to another tool, inside the same effect that handles identification:
If the URL isn’t ready yet (rare, but possible if the snippet hasn’t bootstrapped), retry on the next event tick or skip silently — the linkage is best-effort.
Stability
The URL changes:
- Across sessions — every new visit gets a new session id.
- When you re-identify — calling
setIdentity with a different uid starts a new session.
Re-attach the URL to other tools whenever you re-identify.
See also
- Analytics tool linkage — concrete examples for PostHog, Segment, Amplitude, Mixpanel.
- Identification — the lifecycle hook to read the URL from.