Cookie Disclosure & Implicit Opt-In
Home
Info

Minimal Cookie Disclosure Implicit Opt-In Script

This script display a Cookie Disclosure implicit Opt-In div box on the right bottom into the webpage (please visit it).
When the red cross in the upper right corner in the implicit Opt-In div box is clicked, a cookie is set and saving and the div box disappears and does not appear anymore during a website visit under the same internet domain name.
The cookie is valid for one internet domain name, each subdomain being treated as a separate internet domain name. www and non-www are also two different internet domain names.
The cookie will be deleted when the browser is closed.

1.) You can design all CSS and text yourself.
2.) Please insert the link to your Privacy Policy webpage.
3.) Please insert the script directly before the closing </body> tag.

You can control and test it with these three buttons.
    Reload Webpage
Please note: In addition, Piwik Tracking Tool is active on this webpage (cookies with "_pk").

<div id="eudsgvonote" style="position:fixed !important;bottom:1px !important;right:1px !important;padding:5px !important;text-align:center !important;background-color:#ffffff !important;opacity:0.9 !important;color:#000000 !important;font-family:Helvetica,Arial,Geneva,sans-serif !important;font-size:0.8em !important;z-index:1000 !important;border-style:dashed !important;border-color:#ff0000 !important;border-width:5px !important;border-radius:10px !important;">
<!-- Opt-In text -->
Cookies in use.
<br>
<!-- Privacy Policy link -->
<a href="https://www.example.com/privacy-policy.html" style="font-family:helvetica !important;font-weight:bold !important;font-size:1em !important;color:#888888 !important;">
<!-- Privacy Policy link text -->
Privacy Policy
</a>
<button type="button" onclick="eudsgvooptin()" title="close" style="background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIhSURBVDjLlZPrThNRFIWJicmJz6BWiYbIkYDEG0JbBiitDQgm0PuFXqSAtKXtpE2hNuoPTXwSnwtExd6w0pl2OtPlrphKLSXhx07OZM769qy19wwAGLhM1ddC184+d18QMzoq3lfsD3LZ7Y3XbE5DL6Atzuyilc5Ciyd7IHVfgNcDYTQ2tvDr5crn6uLSvX+Av2Lk36FFpSVENDe3OxDZu8apO5rROJDLo30+Nlvj5RnTlVNAKs1aCVFr7b4BPn6Cls21AWgEQlz2+Dl1h7IdA+i97A/geP65WhbmrnZZ0GIJpr6OqZqYAd5/gJpKox4Mg7pD2YoC2b0/54rJQuJZdm6Izcgma4TW1WZ0h+y8BfbyJMwBmSxkjw+VObNanp5h/adwGhaTXF4NWbLj9gEONyCmUZmd10pGgf1/vwcgOT3tUQE0DdicwIod2EmSbwsKE1P8QoDkcHPJ5YESjgBJkYQpIEZ2KEB51Y6y3ojvY+P8XEDN7uKS0w0ltA7QGCWHCxSWWpwyaCeLy0BkA7UXyyg8fIzDoWHeBaDN4tQdSvAVdU1Aok+nsNTipIEVnkywo/FHatVkBoIhnFisOBoZxcGtQd4B0GYJNZsDSiAEadUBCkstPtN3Avs2Msa+Dt9XfxoFSNYF/Bh9gP0bOqHLAm2WUF1YQskwrVFYPWkf3h1iXwbvqGfFPSGW9Eah8HSS9fuZDnS32f71m8KFY7xs/QZyu6TH2+2+FAAAAABJRU5ErkJggg==) !important;background-position:center !important;background-repeat:no-repeat !important;width:20px !important;height:20px !important;position:absolute !important;top:-6px !important;right:-6px !important;padding:10px !important;border-radius:10px !important;border-style:outset !important;background:#eeeeee;cursor:pointer !important;">
</button>
</div>

<script>
var domainname = window.location.hostname;
var cookiename = "eudsgvocookie" + domainname.replace(/\./g, "");
if (document.cookie.indexOf(cookiename) >= 0) {
document.getElementById("eudsgvonote").style.display = "none";
}

function eudsgvooptin() {
var cookienamevalue = cookiename + "=" + "accepted;path=/";
document.cookie = cookienamevalue;
document.getElementById("eudsgvonote").style.display = "none";
}
</script>
</body>
</html>

The closing </body> and </html> tags are not included.

If your web pages are stored in different directories, you can manipulate the Javascript code snippet.

https://www.example.com/wordpressone
https://www.example.com/wordpresstwo

Search these line in the script and edit it.
var cookiename = "eudsgvocookie" + domainname.replace(/\./g, "") + wordpressone;

var cookiename = "eudsgvocookie" + domainname.replace(/\./g, "") + wordpresstwo;
Support Penultima.de
PayPal Gefällt Mir Button
© Penultima.de - All rights reserved. Data protection statement & Imprint & Contact
Cookies in use.
More Infos