PRA/DSAR - Web CMP Opt Out
Overview
If you would like to opt out of specific Web CMP purposes after a user submits a PRA/DSAR form on your website, the following solution can be used.
PRA/DSAR
Your web form must be an iFrame/embedded web form on the page. This allows us to post an event on click of the submit button on the form. To locate your iFrame script, head to Privacy Rights Automation > Setup > Web Forms > Your Form > Integrate.

In the same section under Settings, enable the Post an Event on Click of Submit Button toggle and add your target window URL.

See more information regarding the PRA Form Submission Event here.
Web CMP
IMPORTANT
The Web CMP script must be present on the same page as the embedded PRA/DSAR form.
After the setup steps above, you can utilize the form submission event to programmatically trigger an opt out in the Web CMP.
PRA/DSAR form event
window.addEventListener("message", function(event) {
if (event.origin != 'https://webformurl.com') {
// something from an unknown domain, ignore
return;
}
alert( "received msg from parent: " + event.data);
});
Option 1: Reject All
Opts out of all non Strictly Necessary categories in the CMP
OneTrust.RejectAll()
window.addEventListener("message", function(event) {
OneTrust.RejectAll();
});
Option 2: Update Consent By Category
Opts in/out of specific categories in the CMP
OneTrust.UpdateConsent(groupIdType, bitValue)
window.addEventListener("message", function(event) {
OneTrust.UpdateConsent("Category","C0004:0");
});
You can see a full list of available Cookies CMP public methods here.
Updated 5 days ago