How to track users across multiple subdomains?

Kamil Drazkiewicz
Kamil Drazkiewicz1 minMay 11, 2022

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: '' })

Related articles

    Start understanding
    your users today

    Free 14-day trial

    No credit card required

    Easy setup