API Docs for: 2.18.0
Show:

Consent Class

Defined in: src/consent.js:226

Invoke these methods on a consent state object.

Usage: var consent = mParticle.Consent.createConsentState()
consent.setGDPRCoonsentState()

Methods

addGDPRConsentState

(
  • purpose
  • gdprConsent
)

Defined in src/consent.js:236

Add a GDPR Consent State to the consent state object

Parameters:

  • purpose Object

    [String] Data processing purpose that describes the type of processing done on the data subject’s data

  • gdprConsent Object

    [Object] A GDPR consent object created via mParticle.Consent.createGDPRConsent(...)

getCCPAConsentStatensent

() Object

Defined in src/consent.js:336

Gets the CCPA Consent State

Returns:

Object:

A CCPA Consent State

getGDPRConsentState

() Object

Defined in src/consent.js:299

Gets the GDPR Consent State

Returns:

Object:

A GDPR Consent State

removeCCPAConsentState

()

Defined in src/consent.js:346

Removes CCPA from the consent state object

removeGDPRConsentState

(
  • purpose
)

Defined in src/consent.js:283

Remove a GDPR Consent State to the consent state object

Parameters:

  • purpose Object

    [String] Data processing purpose that describes the type of processing done on the data subject’s data

setCCPAConsentState

(
  • ccpaConsent
)

Defined in src/consent.js:310

Sets a CCPA Consent state (has a single purpose of 'data_sale_opt_out')

Parameters:

  • ccpaConsent Object

    CCPA Consent State