Consent model¶
Consent
is a model representing a single Consent object. It doesn't have any public fields but has a few methods:
consent.getName(): TConsentName¶
The getName
method allows to retrieve a name of the consent. Return the TConsentName
which is one of the four consent names:
analyticsConsent
marketingConsent
functionalConsent
platformAnalyticsConsent
consent.isGranted(): boolean¶
The isGranted
method allows to retrieve a boolean
representing whether this consent is granted or not.
consent.grant(): void¶
The grant
method allows to grant the consent. This method emits the consentGranted event.
consent.withdrawn(): void¶
The withdrawn
method allows to withdraw the consent. This method emits the consentWithdrawn event.