-
Print
-
DarkLight
To get the current status of the JENTIS Consent Engine you have to use the following functions.
jentis.consent.engine.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.
Parameter
- String: Id of the Vendor you want to get the status of.
Return
Bool: true if the consent for the given vendor is given, false if there exists no such vendor or consent is denied.
Example
var bGoogleConsent = jentis.consent.engine.getVendorConsent("ga");
jentis.consent.engine.getAllConsents
Use this function to get all consent status for all vendors.
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();
jentis.consent.engine.getConsentId
Use this function to get the current consent-id of an user.
Parameter
none
Return
String The current used user-consent-id or false, if no consent yet decided.
Example
var sConsentId = jentis.consent.engine.getConsentId();
jentis.consent.engine.getVendorFullData
Use this function to get all information about the vendors in your wanted language.
Parameter
none
Return
Object of vendor-ids followed by a object with the following data.
- vendor
- id
- name
- street
- zip
- country
- iso
- name
- purpose
- id
- name
- justification
- id
- name
- description
{
"ga" : {
"status" : true,
"vendor" : {
"id" : "ga",
"name" : "Google Analytics",
"street" : "Google Street 1",
"zip" : "114011",
"country" : {
"iso" : "us",
"name" : "United States of America"
}
},
"purpose" : {
"id" : "stat",
"name" : "statistic"
},
"justification" : {
"id" : "consent",
"name" : "consent"
},
"description" : "bla bla bla bla bla"
},
"fb" : {...}
}
Most of the fields are self explaining. The status key contains, if you are allowed to send data to the vendor (true) or not (false). In case of justification “consent” true means the user has given a consent for this vendor. If there is another justification then “consent” the status will be true without having a consent from the user.
Example
oVendorInfo = jentis.consent.engine.getVendorFullData();
jentis.consent.engine.getLastUpdateTime
Use this function to get the timestamp of the last Update from the user.
Parameter
none
Return
The timestamp (UNIX Timestamp in microseconds) of the last consent update from the user.
Example
var iLastUpdate = jentis.consent.engine.getLastUpdateTime();
jentis.consent.engine.getTemplateConfig
Get the configuration data the administrator has stored for the template.
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();