setComplianceSettings
The setComplianceSettings() method saves the visitor's consent choices from the consent form. Once invoked, Consent Manager triggers a page view, causing all tags requiring specific consent to fire immediately.
Syntax
ppms.cm.api('setComplianceSettings', settings, onFulfilled, onRejected);
Parameters
settings (object, required)
The consent settings object. Example: {consents: {analytics: {status: 1}}}
Where consent.analytics is consent type and status indicate:
0
: A visitor rejected consent.1
: A visitor approved consent.
onFulfilled() (function, required)
The fulfillment handler callback (called with result).
onRejected(error)
The rejection handler callback (called with error code). If not specified, the exception will be thrown in the main stack trace.
error (string | object, required)
Error code or exception
Examples
Updated 6 days ago