Skip to main content
All CollectionsTracking code
Tracking users across multiple subdomains
Tracking users across multiple subdomains
Kamil avatar
Written by Kamil
Updated over a week ago

Let’s say you install a script on domains and When the user goes from one domain to another, it will be registered as two separate sessions under two different IDs.

In this situation, LiveSession sees the same person as two separate users. Here’s how you can solve this issue:

To track users across multiple subdomains, you have to set a rootHostname option to your top-level domain (eg. when calling the __ls("init") method. Please note that the first character in is a dot.


Your main domain is but you also want to record on :

__ls("init", "YOUR_TRACK_ID", { rootHostname: '' })
Did this answer your question?