SDK initialization options

interface InitOptions {
    request?: Request;
    userId?: string;
    customVariantQueryParam?: string;
}

Properties

request?: Request

Web standard Request object. Use this in a edge function to pass the incoming request object. The SDK will check the request object for cookies to track the user, and extract preset attributes such as query parameters, referrer, geolocation etc.

userId?: string

The user ID. Pass the user ID explicitly.

customVariantQueryParam?: string

Pass a custom variant query parameter name.