consent_status

Prev Next

This event serves retrocompatibility if you're migrating from V2. If you're not migrating from V2, use the UC_CONSENT event.

Usercentrics provides Data Layer and Window events that specifically fire on consent changes.

You can check the contents of the dataLayer by using window.dataLayer

Below the structure of the consent_status is represented:

{
    "action": "onInitialPageLoad",
    "event": "consent_status",
    "type": "EXPLICIT",
    "Service One": true,
    "Usercentrics Consent Management Platform": true,
    "Service Two": false,
    "ucCategory": {
      "essential": true,
      "functional": false,
      "marketing": null,
    },
    (...)
}

Property

Description

action

The action that triggered the event

event

Name of the event (consent_status)

type

Type of the event

ucCategory

Object containing the identifier of all the categories and their consent status

SERVICE_NAME

Entry that contains the status of the service

action

The action that triggered the event. Below are all the possible values for this property:

Value

Description

onAcceptAllServices

Triggered once you click “Accept All”

onDenyAllServices

Triggered once you click “Deny All”

onEssentialChange

Triggered when the consent state changes due to an essential/mandatory service update, without a specific user action (Accept All, Deny All, Save, etc.) being attributable to the change

onInitialPageLoad

Triggered on page load

onNonEURegion

Triggered when the visitor is detected outside the EU/EEA and the setup is configured to apply only to EU visitors, so consent is applied implicitly without showing the banner

onSessionRestored

Triggered in one of these three situations:

  • When you replace current consents by using a given Controller ID

  • When you use Cross Domain Consent Sharing

  • Via WebView User Session Continuity

onTcfStringChange

Triggered when the TCF consent string (tcString) is updated from an external source rather than through direct interaction with this banner

onUpdateServices

Triggered once you edit a specific set of services or a single service and these choices are saved.

onMobileSessionRestore

Triggered when consent is restored from a Usercentrics Mobile SDK session (WebView User Session Continuity)

type

Type of the event. Below are all the possible values for this property:

Value

Description

IMPLICIT

When the user didn't interact with the banner

EXPLICIT

When the user actively gives any type of consent

ucCategory

Object containing the identifier of all the categories and their consent status. The consent status in this object can either be:

Value

Description

true

If all services belonging to this category have the state true

false

If all services belonging to this category have the state false

null

If services belonging to this category have mixed consent states: e.g. Marketing: null if one service is false while other services in this category are true