Consent Management: Configuring OneTrust Consent Migration
Prerequisites
For this tutorial you'll need:
- The role of
OwnerorContributorfor your Astralis organization. - Existing OneTrust consent categories that some users have consented to.
Overview
Astralis supports the migration of consent preferences from OneTrust to Astralis. This feature allows organizations transitioning from OneTrust to Astralis to seamlessly migrate user consent preferences without requiring users to re-consent. This document provides guidance on how to configure and use this feature.
How It Works
The OneTrust migration feature works by mapping OneTrust consent categories to Astralis privacy notices. When a user has an existing OneTrust consent cookie, Astralis will read this cookie and apply the corresponding consent preferences to the Astralis cookie.
Key Components
- OneTrust Consent Cookie: The
OptanonConsentcookie stores user consent preferences in OneTrust. - Astralis Consent Cookie: The
fides_consentcookie stores user consent preferences in Astralis. - Mapping Configuration: A JSON object that maps OneTrust categories to Astralis notice keys.
Configuration Steps
- Define the Mapping: Create a mapping between OneTrust categories and Astralis notice keys. This mapping should be a JSON object, for example:
{
"C0001": ["essential"],
"C0002": ["analytics_opt_out"],
"C0004": ["advertising", "marketing"]
}Encode this mapping using encodeURIComponent(JSON.stringify(mapping)).
- Configure the Mapping: You can provide the
ot_fides_mappingin one of the following ways:
window.fides_overridesObject: Add the mapping to thewindow.fides_overridesobject before initializing Astralis.
window.fides_overrides = {
ot_fides_mapping: encodeURIComponent(JSON.stringify({
"C0001": ["essential"],
"C0002": ["analytics_opt_out"],
"C0004": ["advertising", "marketing"]
}))
};window.fides_overrides is configurable. If you wish to use a different location for your overrides, you may set up the ENV variable FIDES_PRIVACY_CENTER__CUSTOM_OPTIONS_PATH to the desired location, e.g. window.config.fides_overrides. Be careful not to use window.Fides.* as this would override core Astralis functionality. - Cookie: Store the mapping in a cookie named
ot_fides_mapping, which Astralis can read during initialization. - Query Parameter: Pass the
ot_fides_mappingas a query parameter when initializing Fides.js, e.g.https://privacy.example.com/fides.js?ot_fides_mapping=....
For more info on your options, see the FidesOptions Interface Guide.
Once this is set up, Astralis will automatically read the OneTrust cookie and apply the consent preferences to the Astralis cookie.
Edge Cases
- Invalid OneTrust Cookie: If the OneTrust cookie is invalid or malformed, Astralis will skip the migration and use default consent settings.
- Non-Existent Mapping: If a category in the OneTrust cookie does not exist in the mapping, it will not affect the Astralis consent preferences.