Skip to main content
All CollectionsConfigurations
OneTrust for Non-Automated Consent States
OneTrust for Non-Automated Consent States
Luiza Gircoveanu avatar
Written by Luiza Gircoveanu
Updated over a week ago

Overview

Compliance with data privacy regulations requires careful testing of user consent preferences.

In ObservePoint, you can test OneTrust consent preferences in Journeys and Audits by using the Automated Consent Manager State Action type. This can accept and decline all cookies. However, other consent states require using the OneTrust Javascript functions.

Instructions to set Non-Automated Consent States

1. Configure the OneTrust API for Non-Automated Consent States

  • Prepare a JavaScript snippet to update the user consent preferences using OneTrust.UpdateConsent.

Here are some example snippets that can be used or you can write new snippets based on your needs:

OneTrust.UpdateConsent("Category","C0003:1"); 
//Enables consent for functional cookies

OneTrust.UpdateConsent("Category","C0001:1,C0002:1,C0003:0");
//Enable consent for Strictly Necessary and Performance Cookies but deny consent for Functional Cookies

OneTrust.UpdateConsent("Category","C0001:1,C0003:1); 
//Enable consent for Strictly Necessary Cookies and for Functional Cookies

OneTrust.UpdateConsent("Category","C0002:0,C0003:0,C0004:0);
//Disable consent for Performance Cookies, Functional Cookies, Targeting Cookies

Each category is associated with a certain type of cookie and the JavaScript snippet has to be tailored according to your organisation's needs:

Category name

Meaning

C0001

Strictly Necessary Cookies

C0002

Performance Cookies

C0003

Functional Cookies

C0004

Targeting Cookies

C0005

Social Media Cookies

C000X

Custom Category

2. Access the Desired Journey or Audit in ObservePoint

  • Open the journey or audit where you want to test non-automated consent states

  • Navigate to the Pre-Audit Actions (for Audits)/ Actions (for Journeys) and create a new "Execute Javascript" type of action and then paste the OneTrust.UpdateConsent JavaScript snippet you need.

Audits

Journeys

3. Test the new setup: Run the Journey or Audit to confirm that the custom action successfully sets the desired consent states.

Conclusion

Setting Non-Automated Consent States into ObservePoint Journeys and Audits through custom actions is a powerful way to validate compliance with privacy laws.

By using the OneTrust.UpdateConsent method, you can replicate real-world scenarios where user preferences are set programmatically or manually.

Did this answer your question?