Optional
options: InitOptionsAdditional options for initialization of the SDK. Note especially the createTcfApiStub property which is necessary for TCF UIs.
Set optout status in cookie for user and save string in backend
User's decision on all consents
Change the language. All upcoming SDK calls will return information in this language (e.g. getSettingsCore(),getCategories(), getTCFData(), ...). Pay attention that the language needs to be set up in your Usercentrics Admin Interface before!
The language to switch to (ISO 639-1 code)
Initializes the Usercentrics framework. This method must be called when loading your website. The return value defines which UI layer & variant you should initially show for your users.
Mark all services as "Consent given" (e.g. an "Accept All" button was clicked). The SDK will store the consent information and trigger events depending on your Usercentrics Settings.
The manner in which the consent was given (explicit vs. implicit). Default: explicit.
Mark all services as "Consent denied" (e.g. a "Deny All" button was clicked). Essential services will still be marked as "Consent given". The SDK will store the consent information and trigger events depending on your Usercentrics Settings.
The manner in which the consent was denied (explicit vs. implicit). Default: explicit.
Retrieve the user's country information.
Retrieve the categories and their base services info to display this information in your UI.
Retrieve all services without fetching the aggregator.
Mark given services as "Consent given / denied". Essential services will still be marked as "Consent given". The SDK will store the consent information and trigger events depending on your Usercentrics Settings.
The user's decisions for individual services (see interface definition for details)
The manner in which the consent was given/denied (explicit vs. implicit). Default: explicit.
This method sends the message to the parent iframe to communicate the user's decisions
the AMP consent type
the AMP consent action
Optional
initialHeight: stringSave current TCF data based on user decisions according to the rules below:
User decision from the UI
Optional
storageDataTransferObjects: DataTransferObject[]Optional
isRestoreSession: booleanMark all disclosed TCF vendors, purposes, specialFeatures as "consent given" and if applicable "legitimate interest given". The SDK will store the consent information and trigger TCF events. NOTE: This function will also mark the TCF UI as being closed! No need to call the setTCFUIAsClosed() method.
The layer from which the consent was given/denied (firstLayer vs. secondLayer).
Mark all disclosed TCF vendors, purposes, specialFeatures as "consent denied" and if applicable "legitimate interest denied". The SDK will store the consent information and trigger TCF events. NOTE: This function will also mark the TCF UI as being closed! No need to call the setTCFUIAsClosed() method.
The layer from which the consent was given/denied (firstLayer vs. secondLayer).
Retrieve all TCF data, including consents and descriptions for TCF vendors, purposes, special purposes, features, special features, and stacks Only vendors and stacks that have been selected in the admin interface will be returned. Only purposes, features, special features, special purposes that are used by one or more of the selected vendors (and/or selected stacks) will re returned.
Mark given TCF vendors, purposes, specialFeatures as "consent given / denied" and if applicable "legitimate interest given denied". The SDK will store the consent information and trigger TCF events. NOTE: This function will also mark the TCF UI as being closed! No need to call the setTCFUIAsClosed() method.
The user's decisions for individual TCF vendors, purposes, specialFeatures (see interface definition for details)
The layer from which the consent was given/denied (firstLayer vs. secondLayer).
Your unique Usercentrics Id - settingsId or rulesetId