Additional options you can pass to the constructor

Hierarchy

  • InitOptions

Properties

ampEnabled?: boolean

This option is responsible of enabling AMP

blockDataLayerPush?: boolean

Block push to the data layer

controllerId?: string

User's generated controllerId to restore a user session with settingsId NOTE: always store the contorllerId with the settingsId

controllerIds?: RuleSetControllerIds

User's generated controllerIds to restore a user session with rulesetId NOTE: always store the contorllerId with the settingsId

createGppStub?: boolean

Indicate if the GPP stub will be enabled on load time. We can not wait for this information to come from the settings, as by the GPP guidelines the __gpp needs to be exposed from the very start.

createTcfApiStub?: boolean

Indicate if the TCF stub will be enabled on on load time. We can not wait for this information to come from the settings, as by the TCF guidelines the __tcfapi need to be exposed from the very start.

disableServerConsents?: boolean

Enforce consents not being saved on Usercentrics server, only using localstorage for the effect

disableTracking?: boolean

When disabled, analytics will not track ui events

enableDeprecatedV1ConsentSaving?: boolean

When enabled will additionally save consent to the deprecated V1 consents API

euMode?: boolean

When enabled, only servers with EU IPs are used (including CDN)

excludeAcceptAllVendors?: number[]

Array to exclude vendors from the Accept All method

language?: string

Enforce a certain initial language for the user (default: user's browser language)

prefetchServices?: boolean

Enforce the preload of the services information on init

rulesetId?: string

Ruleset id which points to an existing geolocation config settingsIds mapping

sandboxEnv?: boolean

When enable, we use sandbox API only

settingsCache?: string

Optional string, which is added to all settings GET requests, allowing instant cache-busting

storeServiceIdToNameMapping?: boolean

Store service id to name mapping

suppressCmpDisplay?: boolean

Optional boolean, this will force InitialUIValues initialLayer to be UI_LAYER.PRIVACY_BUTTON OR UI_LAYER.NONE

useRulesetId?: boolean

Optional boolean, if true browser SDK will use the config map Id to fetch the settings id depending on user's geolocation

userCountryData?: UserCountryData

Optional userCountry data to simulate user location

userSessionData?: null | UserSessionData

Optional User Session data to be restored on init

version?: string

Lock into a specific Usercentrics settings version (default: latest)