JS: HOW TO USE COOKIES NOTIFICATION BAR

Cookies Notification Bar

You can use a custom Cookies notification bar which using a custom script. This is recommended for TLD's domain (Top Level Domain). If you are using a blogger ccTLD's domain (blogname.blogspot.com) read on 'Custom Cookies Notification for Blogger', but its freely to use this script too.


WHAT ARE COOKIES?


Cookies is the data or text information from the site that people visits and it stored on their browser, like Internet Explorer, Google Chrome, Mozilla Firefox, etc. This data helps the site for remembering any information that you've already visit, so next time you visits to that site again, you've already have some data on that site, it may called with offline data too in some case. Or to site that you have already log in state.



WEBSITE WITH COOKIES NOTIFICATION


You can find out or checks the problem for JavaScript which is encountering a problem like: 'Blocking Render JS' on pagespeed's check site.

And then, finally you can easily put this Custom EU Cookies Notification Bar on your template. This JavaScript is passed a Blocking Render JavaScript's rule:
<!-- Begin Cookie -->
<script type='text/javascript'>
//<![CDATA[
window.cookieconsent_options = {"message":"This website uses cookies to ensure you get the best experience on our website","dismiss":"Got it!","learnMore":"More info","link":"/p/privacy-policies.html","theme":"cookies.notification.flat"};
(function(){var e=document.createElement("script");e.async=true;e.type="text/javascript";e.src="//cdn.staticaly.com/gh/joniibra/webdev/blogger/widgets/en_US/cookies.notification/cookies.notification.flat.js";(document.getElementsByTagName("HEAD")[0]||document.getElementsByTagName("BODY")[0]).appendChild(e)})();
//]]>
</script>
<!-- End Cookie -->



URL OR LINK

Change '/p/privacy-policies.html' to site's Privacy & Policies page.



ADSENSE PROBLEM WITH COOKIES

Some AdSense will not showing up in the site just because not using the cookies notification bar, it's because google has made a change to their policies. So, this notification is really important.


This Custom EU Cookies Notification Bar will only showing once time if the visitor has clicked the "Got It!" button for 356 days or 1 year. Except the visitors clears the browser's cookies.







Rebates Bonus
Exclusive Rebate

Sign up today and be the first to get notified on new updates.


LOAD DISCUSSION

0 comments:

Post a Comment