Skip to main content

browser-tracker.getdomainsessionid

Home > @snowplow/browser-tracker > getDomainSessionId

getDomainSessionId() function

Get the domain session ID (from the first-party cookie) for a tracker.

Signature:
declare function getDomainSessionId(trackerId?: string): string | undefined;

Parameters

ParameterTypeDescription
trackerIdstringThe tracker identifier which the domain session ID will be retrieved from. Defaults to the first initialised tracker.
Returns:

string | undefined

The domain session ID, or undefined if no matching tracker is found