- Available on all Fullstory plans.
- Requires access to your Adobe Analytics implementation (AppMeasurement).
This guide covers sending Fullstory session replay URLs to Adobe Analytics eVars using AppMeasurement. When a Fullstory session is captured, the setFullstoryReplayUrl function retrieves the session replay URL and assigns it to an Adobe Analytics eVar, allowing your analytics team to link Adobe reporting data back to Fullstory session replays.
Looking for a different Adobe integration? See Fullstory and Adobe for all available integration paths. If you use Adobe Experience Platform Data Collection (formerly Adobe Launch or Adobe Tags), the Fullstory Extension is the recommended approach.
This article will cover the following:
Prerequisites
Prerequisites:
- Fullstory: The Fullstory data capture snippet is already installed on your website.
-
Adobe Analytics: Your site uses Adobe Analytics with AppMeasurement (the
sobject is available on the page). -
Available eVar: You have an Adobe Analytics eVar reserved for the Fullstory session replay URL (e.g.,
eVar10oreVar30).
The setFullstoryReplayUrl function
The following function fetches the session replay URL from the Fullstory Browser SDK and assigns it to an Adobe Analytics eVar. It first attempts a synchronous call and, if the URL is not yet available, falls back to the asynchronous FS('observe') callback.
function setFullstoryReplayUrl(eVarName) {
if (typeof window.FS !== 'function') {
console.warn('Fullstory Browser API not found.');
return;
}
/* Use 'url.now' to get the URL at the current moment in time.
Use 'url' for a link to the beginning of the session. */
var fullstoryUrl = window.FS('getSession', { format: 'url.now' });
// Check if the URL was successfully retrieved
if (fullstoryUrl) {
// Set the Adobe Analytics eVar (e.g., s.eVar10)
// Ensure 's' object is defined by your AppMeasurement implementation
if (window.s) {
window.s[eVarName] = fullstoryUrl;
// console.log('Adobe Analytics ' + eVarName + ' set to: ' + fullstoryUrl);
} else {
console.error('Adobe Analytics s object not found.');
}
} else {
// If synchronous call returns null, Fullstory may not have started capture yet.
// For a page load beacon (s.t()), the synchronous method is typically required
// if you don't delay the beacon. For custom link tracking (s.tl()),
// you can use the callback approach below.
window.FS('observe', { type: 'start', callback: function() {
var asyncFullStoryUrl = window.FS('getSession', { format: 'url.now' });
if (asyncFullStoryUrl && window.s) {
// This can set the eVar for a subsequent event/beacon
window.s[eVarName] = asyncFullStoryUrl;
// If this is *not* a page view, you'd fire s.tl() here
// e.g., s.tl(this, 'o', 'FullStory Ready Link');
}
}});
}
}
Note: This code uses version 2 of the Fullstory Browser API. If your site uses an older version of the Fullstory snippet, refer to the V1 API documentation for the equivalent methods.
The function accepts a single parameter, eVarName, which is the name of the Adobe Analytics eVar to populate (e.g., 'eVar10'). The url.now format returns the URL at the current moment in the session rather than the beginning.
Implementation examples
Call setFullstoryReplayUrl at the appropriate point in your tracking code, depending on how you send data to Adobe Analytics.
Page view (s.t())
Call the function before your s.t() call on page load.
// Note: Replace eVarX with your actual eVar, e.g., 'eVar10'
setFullstoryReplayUrl('eVarX');
s.t();
Custom link or event (s.tl())
Integrate the function into your event handler. Add the eVar to linkTrackVars so it is included in the beacon.
document.getElementById('myButton').addEventListener('click', function() {
setFullstoryReplayUrl('eVarX');
if (window.s && window.s.eVarX) {
// Ensure you also set the necessary linkTrackVars for s.tl()
s.linkTrackVars = s.linkTrackVars ? s.linkTrackVars + ',eVarX' : 'eVarX';
s.tl(this, 'o', 'Button Click with FS URL');
}
});
Explicit eVar assignment
To set a specific eVar synchronously, typically placed before s.t():
setFullstoryReplayUrl('eVar30');
Frequently Asked Questions
Why is the eVar empty on some page views?
The Fullstory session URL is not available until the Fullstory script has fully initialized. If setFullstoryReplayUrl runs before initialization completes, the synchronous call returns null and the function falls back to FS('observe'), which fires once capture begins. For page view beacons (s.t()), the synchronous method is typically required since the beacon fires before the observe callback. If the eVar is consistently empty, verify that the Fullstory snippet loads before setFullstoryReplayUrl is called.
Can I use this approach with Adobe Experience Platform instead of Adobe Analytics?
This guide is specifically for Adobe Analytics with AppMeasurement. If you use Adobe Experience Platform, see Fullstory Extension for AEP Data Collection (recommended) or AEP Session URLs via Tealium iQ for the recommended approaches.