Hi,
I’m trying to include some cookie consent code onto my site to comply with good GDPR practices. I stumbled on a site that provided me with this code (below). What I’m wondering is whether this belongs in GP Hooks in the wp_head section. This is where I’ve put it so far and it seems to be working fine. But I’m nervous as to whether or not I put it in the correct area. I already have some typekit code in there above this code so I’m nervous to add anything. Anyway, thanks!
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.js"></script>
<script>
window.addEventListener("load", function(){
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "#252e39"
},
"button": {
"background": "#d46c5b"
}
},
"theme": "classic",
"position": "bottom-right",
"content": {
"message": "This website uses cookies to ensure you get the best experience on our website.",
"href": "https://www.lesslikely.com/privacy-policy/"
}
})});
</script>