I'm new here

UCP settings loaded event


Depending on if the consent is required for a given site, I need to load / not load content. In order to do so, I am checking the evidon.notice.consentRequired variable. The problem is that there is no event/callback that is triggered/called when the settings are loaded. I noticed that there is an internal event in evidon-sitenotice-tag "loaded" that can be subscribed to using the events.subscribe API. 
The event is triggered correctly if the settings are available for the current domain. But is not triggered when they don't exist. (The _getSettings function returns null and therefore the event is not called)

Is there a way to safely assume that the website does not require consent? 

Is a documentation concernring the site notice events API available? 


0 Kudos
1 Reply
Crownpeak Employee
Crownpeak Employee

Re: UCP settings loaded event

Hello Redaais,

The best way to handle this is to use our priorconsentcallback handler. The purpose of the callback is to indicate it is safe to load tags. Even if consent isn’t required we will trigger that event. Once the event is triggered you can safely assume all the settings are loaded and the environment is good. If you need to read specific values from the settings directly they will be available for you at that time. There isn't a way to safely assume that the website does not require consent.


I've attached a copy of our Universal Consent Javascript API.


If you have any additional questions please let me know.




Nick Foster

Support Engineer


Nick Foster
Support Engineer

## If I’ve helped, accept this response as a solution so that other’s can find is more quickly in the future.
## Have thoughts on Crownpeak products? We'd love to hear them. Speak with the Crownpeak Product Team..

0 Kudos