mParticle.Consent Class
Invoke these methods on the mParticle.Consent object. Example: mParticle.Consent.createConsentState()
Item Index
Methods
createCCPAConsent
-
optOut -
timestamp -
consentDocument -
location -
hardwareId
Creates a CCPA Opt Out Consent State.
Parameters:
-
optOutBooleantrue represents a "data sale opt-out", false represents the user declining a "data sale opt-out"
-
timestampNumberUnix time (likely to be Date.now())
-
consentDocumentStringdocument version or experience that the user may have consented to
-
locationStringlocation where the user gave consent
-
hardwareIdStringhardware ID for the device or browser used to give consent. This property exists only to provide additional context and is not used to identify users
Returns:
CCPA Consent State
createConsentState
()
Object
Creates a Consent State Object, which can then be used to set CCPA states, add multiple GDPR states, as well as get and remove these privacy states.
Returns:
ConsentState object
createGDPRConsent
-
consent -
timestamp -
consentDocument -
location -
hardwareId
Creates a GDPR Consent State.
Parameters:
-
consentBooleantrue represents a "data sale opt-out", false represents the user declining a "data sale opt-out"
-
timestampNumberUnix time (likely to be Date.now())
-
consentDocumentStringdocument version or experience that the user may have consented to
-
locationStringlocation where the user gave consent
-
hardwareIdStringhardware ID for the device or browser used to give consent. This property exists only to provide additional context and is not used to identify users
Returns:
GDPR Consent State
