Thursday, June 7, 2018

Put Cookie Consent On Your Blogger Site



Google is putting the notice in every admin console of blogger.com where cookies are being used for tracking or Adsense purpose. So, here is what you have to do to put a consent on your site. I found this piece of html from http://silktide.com which is very useful and quick.


1) Go to the "Theme" section of your admin console and click on Edit HTML.

2) Find the tag </head> in template and paste this below code just above this tag.

<script type='text/javascript'>
window.cookieconsent_options = {
 "message" : "-- YOUR MESSAGE HERE --",
 "dismiss" : "Got it !",
 "learnMore" : "More info",
 "link" : "-- YOUR PRIVACY POLICY URL --",
 "theme" : "light-bottom"
};
</script>

<script type='text/javascript'>
src='//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/1.0.10/cookieconsent.min.js'
</script>


... and you are done 👍. Save it and check. It should show something like below :



No comments:

Post a Comment