Skip to content

ConsentOptions

The signals from a consent banner and the respondent’s browser, sent as they are for the API to resolve. Every member is optional. gpc and dnt default to the browser’s Global Privacy Control and Do Not Track settings when running in a browser; pass a value to override.

optional cmp?: "granted" | "denied"

The respondent’s explicit choice about being recognised across visits, from your consent banner.


optional cmpString?: string

Your banner’s own consent string (a TCF string, for instance), kept as the organization’s evidence. Up to 4096 characters.


optional dnt?: boolean

Do Not Track. Defaults to navigator.doNotTrack === '1'.


optional gpc?: boolean

Global Privacy Control. Defaults to navigator.globalPrivacyControl.