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:
-
optOut
Booleantrue represents a "data sale opt-out", false represents the user declining a "data sale opt-out"
-
timestamp
NumberUnix time (likely to be Date.now())
-
consentDocument
Stringdocument version or experience that the user may have consented to
-
location
Stringlocation where the user gave consent
-
hardwareId
Stringhardware 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:
-
consent
Booleantrue represents a "data sale opt-out", false represents the user declining a "data sale opt-out"
-
timestamp
NumberUnix time (likely to be Date.now())
-
consentDocument
Stringdocument version or experience that the user may have consented to
-
location
Stringlocation where the user gave consent
-
hardwareId
Stringhardware 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