Adding Third Party Consent Management on Nyla
You can integrate Custom Consent Management platforms with Nyla if you want to create a more custom experience than than the Nyla native consent banner allows for. If integrating a custom consent platform, you should make sure to read our documentation on managing user consent.
Custom Consent Management platforms must be loaded on the Nyla site using Nyla Custom App, and inform Nyla of the categories that the user has granted consent for.
This article walks you through how to integrate custom consent management platforms to your Nyla site.
Note: Nyla does not offer native support for third party consent banners, so if you choose to integrate a third party consent platform, it is your responsibility to integrate via Nyla Custom App and to own ensuring that customer consent preferences are correctly managed for all platforms.
This includes informing Nyla of the categories that the user has granted consent for.
Activating the App
In order to activate your custom Consent Management Platform, you should:
- Go to Apps > Consent Banner and enable the app
- You must set the `Use Custom CMP`setting to on
- Ensure your changes are saved and published
Once the "Use Custom CMP" setting on, the other settings in the consent banner app will not do anything, so you should manage your consent settings in your relevant third party platform.
Integrating the custom Consent Management Platform
Go to Custom App and under Script Loader, create a custom app for your CMP.
The specific details on how to integrate will depend on your platform of choice, but will generally require creating a new global app that loads their external script, and adding an inline script so that once the CMP knows the user consent, it maps it and forwards it to Nyla using a custom event.
// on the callback of consent update from your CMP
document.dispatchEvent(
new CustomEvent(
'on_custom_cmp_consent_update',
{
// map the CMP categories to the Nyla Categories
// these would correspond to an Accept All
detail: ['analytics', 'marketing', 'preferences', 'saleOfData']
}
);
);