Skip to content

Unity Event API

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

Property Type Notes
consents UsercentricsServiceConsent List of Services with consent choices.
controllerId String A Usercentrics generated ID, used to identify a specific user. See Restore User Session
tcString String IAB's Transparency & Consent 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

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

Property Type Notes
applied ConsentApplied List of Consent Applied payload.

ConsentApplied

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();