Cookie Consent

Cookies are tiny files that are stored on your computer by browsers. These contain basic information about your system context, and with your specific consent, can be used for storing more details, to fill forms automatically. With this you can avoid repetitive entry of information from you if you choose to.

Configuring this consent allows you to ask for consent to store a cookie on your cidaas authenticated end user's device.

In this section, you will find the steps on how to integrate cidaas cookie consent to your website.

Overall process would be

  • Create cookie consent in cidaas
  • Include scripts to your website
  • Verify your configuration

We'll guide you through the process — it's pretty easy.

You need to define how your cookie consent screen should appear and you can also specify all the information you need to show in your cookie consent screen. These configurations can be done in cidaas via Admin portal.

1. Login to cidaas Admin portal. Navigate to Dashboard -> Settings -> Cookie Consent. Click on Create Cookie button.

2. Here you need to fill basic details about your cookie consent.

The description for the fields are as follows,

Field Description

version

version number of your cookie consent which is generated by default

timeout

Value in seconds after which the cookie screen will automatically disappear. Use values of 0 or lower to not auto hide.

theme

Customize how your coookie screen should appear. There are four themes available which are dark, light, light small and dark small


3. Now, you need to fill details for the Advanced settings section.

The description for the fields of Advanced settings are as follows,

Field Description

advanced_settings

Enable to show an advanced settings button, displaying the Cookie Preference Center(CPC). This enables the user to choose their own level of privacy.

require_optout_confirm

Flag to activate the opt-out confirmation dialog within CPC. If set to true, addition label definitions will be shown.

cpc_type

Specifies the type (the layout) of the CPC. Currently, two types are supported: 'standard' and 'tabs'.

Select Locale

select locale for your cookie screen

Intro Heading

Heading for your cookie screen

Intro

Description for your cookie screen

cpc_heading

Heading for the CPC which will be shown when you enable advanced setting.

cpc_text

Enter the exact wordings to be shown as the purpose for asking the consent from end user. This will be shown to end user.

label_button_yes

The label of the consent button in the cookie preference center.

label_button_back

The label of the back button in the cookie preference center.

label_cpc_activate_all

The label of the button that activates all purposes in the cookie preference center.

label_cpc_deactivate_all

The label of the button that deactivates all purposes in the cookie preference center.

label_cpc_purpose_desc

The headline of the purposes section (standard CPC) or its intro text (Tab-based CPC).

purpose_optout_confirm_heading

The headline of the opt-out confirmation dialog.

purpose_optout_confirm_text

The text of the opt-out confirmation dialog.

purpose_optout_confirm_proceed

The confirmation button label of the opt-out confirmation dialog.

purpose_optout_confirm_cancel

The cancel button label of the opt-out confirmation dialog.

label_third_party

The headline of the vendors section in cpc

Title

The title for the purpose

Description

The description about the purpose

feature

The features of the purpose, if needed


4. If you want to add custom purpose to your cookie consent screen, then you need to fill details about your custom purpose.

The details about the fields are as follows,

Field Description

Title

Heading of custom purpose

Description

Description about your custom purpose


5. Now you have successfully created your consent. Your consent will be listed in Cookie Consent section in cidaas. Note that, only last created consent is editable, while other consents will become view-only.

6. To view the report of visited users, click on the report button corresponding to each report.

Reports will be listed as shown below,

Include scripts to your website

To include the created cidaas cookie consent in your website, make use of the following API's and the scripts,

1. API to get consent details


URL : {{baseUrl}}/consent-management-srv/anonymous/consent/public/{{requestId}}

API Method : GET 

Service Response:
{
  config_version: 21
  iabVendorBlacklist: []
  iabVendorWhitelist: []
  className: "de.cidaas.core.db.AnonymousConsentVersion"
  publicPath: "/assets/oiljs/1.3.5"
  timeout: "15"
  advanced_settings: true
  require_optout_confirm: true
  theme: "dark"
  cpc_type: "standard",
  customPurposes: [...]
}

2. Inject the script to your website

callScript(scriptData: any) {
     var script = document.createElement('script');
      let scriptData={};
      script.type = "application/configuration";
      script.innerHTML = JSON.stringify(scriptData);
      script.id = "oil-configuration";
      script.addEventListener('load', resolve);
      script.addEventListener('error', () => reject('Error loading script.'));
      script.addEventListener('abort', () => reject('Script loading aborted.'));
      document.head.appendChild(script);

      script = document.createElement('script');

      script.type = "text/javascript";
      script.src = "https://cdn.cidaas.de/consent/oiljs/1.3.5/oil.1.3.5-RELEASE.min.js";
      script.addEventListener('load', resolve);
      script.addEventListener('error', () => reject('Error loading script.'));
      script.addEventListener('abort', () => reject('Script loading aborted.'));
      document.head.appendChild(script);

      script = document.createElement('script');

      script.type = "text/javascript";
      script.src = "https://cdn.cidaas.de/consent/oiljs/scripts/oil.js";
      script.addEventListener('load', resolve);
      script.addEventListener('error', () => reject('Error loading script.'));
      script.addEventListener('abort', () => reject('Script loading aborted.'));
      document.head.appendChild(script);
}

3. Trigger the events for vendorConsents, PublisherConsent and Consent data.


 __cmp('getVendorConsents', null, (result) => {
        vendorconsent = result;
    });

    __cmp('getPublisherConsents', null, (result, success) => {
        publisherconsent = result;
    });

    __cmp('getConsentData', null, (result, success) => {
        consentdata = result;
    });

4. API to accept cookie consent

URL: {{baseUrl}}/consent-management-srv/anonymous/consent/accept

API Method : POST

Service Request:
 let acceptCookieData = {
          requestId: requestId,
          eventType: JSON.parse(eventData),
          action: "ACCEPT",
          fingerPrint: fingerPrint,
          userAgent: navigator.userAgent,
          publisherConsents: publisherconsent,
          consentData: consentdata,
          vendorConsents: vendorconsent
        }

Service Response:
   success: true
   status: 200
   data: {posted: true}

5. API to modify cookie consent

URL : {{baseUrl}}/consent-management-srv/anonymous/consent/accept

API Method : POST

Service Request:
 let modifyCookieData = {
          requestId: requestId,
          eventType: JSON.parse(eventData),
          action: "MODIFY",
          fingerPrint: fingerPrint,
          userAgent: navigator.userAgent,
          publisherConsents: publisherconsent,
          consentData: consentdata,
          vendorConsents: vendorconsent
        }

Service Response:
   success: true
   status: 200
   data: {posted: true}

Verifying the Configuration

Now that you have configured, go to your application where you injected the scripts and then look for a consent request window as shown in below example

If you click More Information button, the following screen will appear,




results matching ""

    No results matching ""