Is there a way to enable cookie popup

book

Article ID: 126413

calendar_today

Updated On:

Products

CA API Developer Portal CA API Gateway

Issue/Introduction

There is a requirement by law in some regions to have an acceptance of cookies when connecting to a site on the web before usage.
 

Is there a way to enable cookie popup? 
Most often is done by pop up to accept. Is something like that implemented?

Environment

API Portal 3.5

Resolution

We can recommend using a javascript library to provide the cookie consent notice to site visitors. You can download and install one from https://cookieconsent.insites.com/ which allows the customer to customize their own message and links to learn more. 

When the customer is crafting the informational message, it's important to note that the portal does not support the option to completely disable cookies. Each customer may have their own additional requirements for using cookies, but cookies are essential for the portal to function and authenticated users cannot opt out. 

The customer can copy the code output found on https://cookieconsent.insites.com/download/ and paste it in the head section of the page layout boilerplate files found in /admin?action=list&path=/sitebuilder/layouts 

 

After change and publish the *.bplt files under /sitebuilder/layouts, need to publish the corresponding *.xsl files under /sitebuilder/generated/layouts, as well.

Additional Information

Example code :

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Homepage</title>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.js"></script>
<script>
window.addEventListener("load", function(){
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "#000"
},
"button": {
"background": "#f1d600"
}
}
})});
</script>
</head>