Can the Fullstory cookie be associated with a specific subdomain?

When the Fullstory snippet is executed, the cookie data associated with the session will by default be stored in a cookie associated with the second-level domain (e.g. .yoursite.com), regardless of the domain level of the current page.

For example, visitors to both help.yoursite.com and yoursite.com will both have session data stored in a cookie associated with .yoursite.com. This allows the same user session to be captured across multiple pages on the same second-level domain and makes for a seamless playback experience within the Fullstory app.

Changing the default domain behavior

Customers may wish to change the default domain behavior so that the cookie is associated with a specific subdomain rather than the second-level domain. For example, if you were only capturing visitors to app.yoursite.com and didn't want the cookie to be associated with .yoursite.com, you could modify our snippet to include the following line at the top:

window["_fs_cookie_domain"] = "app.yoursite.com"

Keep in mind that by specifying that the cookie should be associated with the subdomain, rather than the second-level domain, if the user visits Fullstory on a different subdomain on the same site, Fullstory will assume this is a new visitor to the site and the session will be split. (You can somewhat workaround this issue by identifying the user on both sides of the domain boundary, which will cause the sessions to be listed under the same user, but the session will still split at the domain boundary).

Need to get in touch with us?

The Fullstory Team awaits your every question.

Ask the Community Technical Support