CategoriesView All

Event

OneTrust is a global leader for GDPR and privacy management.

mParticle’s OneTrust integration supports the Web platform only, and operates in a unique way. While it is enabled as an Event integration, no event data is passed from mParticle to OneTrust.

The purpose of the integration is to allow you to use OneTrust to manage user consent in the browser, and to map OneTrust’s “Cookie Groups” to mParticle’s consent “purposes”. mParticle can, in turn, use this consent information to enable and disable other integrations, power consent forwarding rules, etc. Read our documentation on Consent Management to understand more about consent purposes.

Enable the Integration

To enable the OneTrust integration, just add it from the directory, and connect it to your Web input, as with any event integration. In the Connection Settings, you need to map your OneTrust Cookie Groups to your mParticle consent purposes.

The ID of each of your Cookie Groups can be found in the OneTrust dashboard:

In this example, Performance Cookies (group 2) are mapped to the “Performance” purpose, and Targeting Cookies (group 4) are mapped to the “Marketing” purpose:

How it works

Whenever a user browses your site, OneTrust sets a OnetrustActiveGroups variable on the window. This variable is a comma-separated list of Cookie Groups the current user is part of. The value might look like "2, 4".

When the OneTrust integration is enabled, the mParticle SDK checks the value of OnetrustActiveGroups and sets consent state for each mapped purpose. If the mapped Cookie Group ID is listed in OnetrustActiveGroups, mParticle will set the value of consented to true for the corresponding purpose. If the ID is not listed, mParticle sets consented to false.

For example, if your Cookie Groups are mapped as above, and the value of OnetrustActiveGroups is "2", mParticle will set consented to true for the “Performance” purpose and false for the “Marketing” purpose.

The mParticle SDK will automatically update consent state if the user changes, or if the value of OnetrustActiveGroups changes.

Connection Settings

Setting Name Data Type Default Value Description
Consent Groups string Mapping of your OneTrust consent groups to mParticle consent purposes.