Consent Listener
Subscribe
Subscribe to any consent updated event that happens within Usercentrics SDK This API is meant for third-parties, that need to pull consent from the Usercentrics SDK.
Usercentrics.Instance.SubscribeOnConsentUpdated((consentEvent) => { // Handle consentEvent});ConsentEvent
Event contains user consent information.
Property | Type | Notes |
|---|---|---|
consents | List of Services with consent choices. | |
controllerId | String | A Usercentrics generated ID, used to identify a specific user. See Restore User Session |
tcString | String | |
uspString | String | IAB's US Privacy String |
acString | String | A String that represents the consented and disclosed Google Ad Technology Providers (ATPs), as defined by Google. |
UsercentricsServiceConsent
The current consent status of a specific service.
Property | Type | Notes |
|---|---|---|
templateId | String | ID used to match a service with frameworks running on your app. See Applying Consent. |
status | Bool | Consent status given to this specific service. |
dataProcessor | String | Name of entity processing the data that was collected via this service. |
version | String | Legal template version. See Service Settings. |
Dispose Listener
Dispose any subscription to this API.
Usercentrics.Instance.DisposeOnConsentUpdatedSubscription();Mediation Listener
Subscribe
Subscribe to any mediation updated event that happens within Usercentrics SDK This API is meant for third-parties, that need to pull mediation from the Usercentrics SDK.
Usercentrics.Instance.SubscribeOnConsentMediation( (mediationEvent) => {
// Handle mediationEvent});MediationEvent
Event that contains list of the consents applied through consent mediation.
Property | Type | Notes |
|---|---|---|
applied | List<ConsentApplied> | List of Consent Applied payload. |
ConsentApplied
Contains information about consent applied through consent mediation.
Property | Type | Notes |
|---|---|---|
name | String | Name of the SDK mediated. |
templateId | String | Template ID that represents the SDK. |
consent | Bool | Consent status given to this specific service. |
mediated | Bool | Mediation success status. |
Dispose Listener
Dispose any subscription to this API.
Usercentrics.Instance.DisposeOnConsentMediationSubscription();