The CCPA provides that every website should have a Privacy Policy. This Privacy Policy must advise consumers of the various rights that the CCPA gives them. Although the CCPA contains various other obligations, the Privacy Policy is the most significant requirement.
So, what does the CCPA mean for existing Privacy Policies? It's simple. If you already have a Privacy Policy in place, then you'll probably have to make some amendments, which is why it's handy to have a checklist of everything your CCPA Privacy Policy should contain.
You can add cookie bar very easily.
Just add given below code into your anywhere in yout HTML page OR In your WordPress template file OR Any other CMS as well.
HTML code<div class="alert alert-dismissible text-center cookiealert" role="alert"> <div class="cookiealert-container"> <b>Do you like cookies?</b> 🍪 We use cookies to ensure you get the best experience on our website. <a class="text-white" href="/privacy-policy/" target="_blank">Learn more</a> <button type="button" class="btn btn-primary btn-sm acceptcookies" aria-label="Close"> I agree </button> </div> </div>
JavaScript Code
<!-- Cookies bar--> (function(){"use strict"; var cookieAlert=document.querySelector(".cookiealert"); var acceptCookies=document.querySelector(".acceptcookies"); cookieAlert.offsetHeight; if(!getCookie("acceptCookies")){cookieAlert.classList.add("show");} acceptCookies.addEventListener("click",function(){setCookie("acceptCookies",true,60); cookieAlert.classList.remove("show");});})(); function setCookie(cname,cvalue,exdays) { var d=new Date();d.setTime(d.getTime()+(exdays*24*60*60*1000)); var expires="expires="+d.toUTCString(); document.cookie=cname+"="+cvalue+";"+expires+";path=/"; } function getCookie(cname){ var name=cname+"="; var decodedCookie=decodeURIComponent(document.cookie); var ca=decodedCookie.split(';'); for(var i=0;i<ca.length;i++){ var c=ca[i];while(c.charAt(0)===' '){c=c.substring(1); } if(c.indexOf(name)===0){ return c.substring(name.length,c.length);} } return "";}
CSS
/* cookiealert */ .cookiealert{position:fixed;bottom:0;left:0;width:100%;margin:0!important;z-index:999;opacity:0;border-radius:0;background:#212327;transform:translateY(100%);transition:all 500ms ease-out;color:#ecf0f1}.cookiealert.show{opacity:1;transform:translateY(0%);transition-delay:1000ms}.cookiealert a{text-decoration:underline}.cookiealert .acceptcookies{margin-left:10px;vertical-align:baseline}Please Contact us us for any query.