Getting multiple Domain user id & Session ID for same user

I have hosted the snowplow javascript tracker on domain and calling the tracker on my multiple website domain which are , , etc .

I am getting unique network user ID accross domain but for each request different domain_sessionid and domain_userid .
It has also been observed that only third party cookie is set for but cannot set first party cookie which might be causing the issue of different id for each request .
when specifying domain , , in configuration the browser is not accepting it and showing error as the javascript is hosted on different domain .

my configuration for cookie :
cookie {
enabled = true
expiration = 365 days# e.g. β€œ365 days”
name = sp
domains = [
β€œ” # e.g. β€œ” -> any origin domain ending with this will be matched and will be returned
β€œ” # e.g. β€œ” -> any origin domain ending with this will be matched and will be returned

fallbackDomain = ""
secure = true
httpOnly = false
sameSite = "None"


@tarunsood, this is expected. The values for domain_sessionid and domain_userid are set in the 1st party cookie by the Javascript (client-side). The network user ID, on the other hand, is set by the collector (3rd party cookie) - your collector settings are relevant to network_userid only.

To be able to stitch the domain_userid across different domains you might need to utilize crossDomainLinker.

1 Like

CrossDomain linker will append query string in parameter which i don’t want my end user to see.

Is there any other way to set first party cookie correctly to avoid this issue.

@tarunsood, for cross-domain tracking you should rely on network_userid. The domain_userid is always bound to the domain the tracked page is implemented on due to its nature. You have confirmed network_userid is persistent across those domains. Why do you cling to domain_userid?

My Requirement is to track session id .

@tarunsood, session ID on its own has no meaning (from my point of view). It’s required to determine what events have fired within the same session. This is done during data modeling (analytics) step.

Do you intend to expend sessions between different domains? If so, it is still could be done at data modeling step even with different session IDs on those domains. The user can be identified by network_userid. When navigating between different domains you control you could use referers and thus extend your sessions by stitching them as well.

You might want to consider passing the session ID between your domains by utilizing getDomainUserInfo method which allows you to acquire the current session ID. It could be passed over somehow to the other domains for stitching purposes.