UsercentricsEvent API¶
This API is created for Partners that are integrating Usercentrics SDK
If you are considering to consume those APIs, make sure that your use case really need this.
Consent Listener¶
onConsentUpdated¶
UsercentricsEvent.shared.onConsentUpdated(callback: <(UpdatedConsentEvent) -> Void>): UsercentricsDisposableEvent<UpdatedConsentEvent>
UsercentricsEvent.onConsentUpdated(callback:<(UpdatedConsentEvent) -> Unit>): UsercentricsDisposableEvent<UpdatedConsentEvent>
Inputs | Type | Notes |
---|---|---|
callback | (UpdatedConsentEvent) -> Void | Callback with relevant information regarding consents |
Output | Type | Notes |
---|---|---|
Disposable Event | UsercentricsDisposableEvent |
Object with a function to dispose the callback created |
dispose¶
let disposableEvent = UsercentricsEvent.onConsentUpdated(callback: ...)
disposableEvent.dispose()
val disposableEvent = UsercentricsEvent.onConsentUpdated(callback: ...)
disposableEvent.dispose()
Objects¶
UpdatedConsentEvent¶
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 |
UsercentricsServiceConsent¶
Property | Type | Notes |
---|---|---|
templateId | String | ID used to match a service with frameworks running on your app. |
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. |
Mediation Listener¶
onConsentMediation¶
UsercentricsEvent.shared.onConsentMediation(callback: <(MediationResultPayload) -> Void>): UsercentricsDisposableEvent<MediationResultPayload>
UsercentricsEvent.onConsentMediation(callback:<(MediationResultPayload) -> Unit>): UsercentricsDisposableEvent<MediationResultPayload>
Inputs | Type | Notes |
---|---|---|
callback | (MediationResultPayload) -> Void | Callback with relevant information regarding mediation |
Output | Type | Notes |
---|---|---|
Disposable Event | UsercentricsDisposableEvent |
Object with a function to dispose the callback created |
dispose¶
let disposableEvent = UsercentricsEvent.onConsentMediation(callback: ...)
disposableEvent.dispose()
val disposableEvent = UsercentricsEvent.onConsentMediation(callback: ...)
disposableEvent.dispose()
Objects¶
MediationResultPayload¶
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. |