GET Information
To get the current status of the JENTIS Consent Engine you have to use the following functions. Use the following APIs and functions client-side (frontend JavaScript, as executed in a website visitors browser) to retrieve information from the JENTIS Consent Engine.
All of the following functions are in context of jentis.consent.engine
, ie. you must call "jentis.consent.engine.getVendorConsent()" accordingly.
getVendorConsent
Use this function to get the consent status for a single vendor. You have to provide the Vendor-ID to get a meaningful result. You will find all those vendor IDs when logged in to your JENTIS Data Capture Platform in the main navigation: Legal Hub: Vendors and when selecting an individual tools vendor.
Input Parameter
String: Id of the Vendor you want to get the status of.
Return
(String) "true"
if the consent for the given vendor is given, "false"
if there exists no such vendor or consent is denied and "ncm"
if this vendor is operating with Essential Mode (JENTIS Essential Mode ) configuration.
Example
var bGoogleConsent = jentis.consent.engine.getVendorConsent("ga");
getAllConsents
Use this function to get all consent status for all vendors.
Input Parameter
none
Return
Object of Vendor-Ids and bool per vendor: true if the consent for the given vendor is given, false if there exists no consent.
{
"ga" : true,
"adw" : false,
"fb" : true
}
Example
var aAllConsent = jentis.consent.engine.getAllConsents();
getConsentData
Use this function to get the custom data from the JENTIS system internal consent object on page scope. This provides a method to read consent document data that was pushed recently on this client, it will not provide a full history for this consent document but only the current state.
Input Parameter
none
Return
Object - representation of all custom data added to the JENTIS system internal consent document on this page scope.
getConsentId
Use this function to get the current consent-id for a user.
Input Parameter
none
Return
(String) The current used user-consent-id or false, if no consent information yet found.
Example
var sConsentId = jentis.consent.engine.getConsentId();
getVendorFullData
Use this function to retrieve all information regarding vendors in your JENTIS Data Capture Platform.
Input Parameter
none
Return
Object of vendor-ids followed by an object with the following structure and properties.
consentMode
: the value describes the consent configuration with this vendor that can bei either of the following (reflecting your configuration in the according section in the JENTIS Data Capture Platform)0
: Consent mode (this vendor operates only when positive consent information is received), this is the default setting for all vendors.1
: Consent disabled (this vendor will not require any consent related information and execute regardless)2
: Consent mode with "Essential Mode" (this vendor has a fallback configuration that activates on negative consent information, please see JENTIS Essential Mode for further details)
status
: the currently available status of this vendor regarding consent (true, false or ncm) as received from either the CMP connection or when information was pushed to the JENTIS Consent Engine
Example
oVendorInfo = jentis.consent.engine.getVendorFullData();
// returns for example:
oVendorInfo = {
"ga" : {
"status" : true,
"consentMode" : 0
},
"fb": {
"status" : false,
"consentMode" : 0
}
}
getLastUpdateTime
Use this function to get the timestamp of the last Update from the user.
Input Parameter
none
Return
The timestamp (UNIX Timestamp in microseconds) of the last consent update from the user.
Example
var iLastUpdate = jentis.consent.engine.getLastUpdateTime();
DEPRECATED - getTemplateConfig
Get the configuration data the administrator has stored for the template.
Input Parameter
none
Return
Each template defines its own configuration data structure. This structure will be returned filled with the stored data.
Here is an example:
{
consenext : "text bla bla bla",
contact : "contact bla bla",
buttonagree : "Alle akzeptieren",
buttondeny : "Ablehnen",
buttonsettings : "Einstellungen",
importantlinks : {
"Impressum" : "/impressum",
"Datenschutz" : "/datenschutz"
}
}
Example
var oConf = jentis.consent.engine.getTemplateConfig();