Workaround for Consent

Code elements are currently not assigned to any vendor in the JENTIS consent engine, so no consent information is checked or applied to them. If consent is an important factor in your custom code, we'd propose that you create a variable that checks a vendor's consent and applies an if-condition based on that.

Find below an example:

"adobeanalytics" is an example for a vendor ID; please replace this with the relevant vendor ID for your use case. If you are not sure which vendor ID it is, you can just run the jentis.consent.engine.getVendorFullData() function to get all currently installed vendors in your container.

var my_tool_consent_status = jentis.consent.engine.getVendorFullData()["adobeanalytics"].status;

if(my_tool_consent_status === true){
  ... // continue with custom code if consent is true
} else {
  ... // do something else if no consent
}

This would need a frontend variable that holds the consent according to the tools. Please create a custom frontend variable of type "Custom JavaScript".

The code to return the current consent status of a tool in the frontend is:

function(){
  return jentis.consent.engine.getVendorConsent("mytool");
}

Please remember that the vendor id must be provided in the getVendorConsent function call.

More details on working with the consent engine can be found here: Consent SDK Basics

Last updated

Was this helpful?