I was following the instructions here a user also reported here: Why Cookie Consent Doesn't Show Up?
The script builder gave me two pieces to add into the template editor.
One in the head, the other in the body.
However I see that the editor actually says:
And for the body it says:
So, for the part to be added into the “body” I can easily just add it in “Footer” section, it doesn’t really matter as it’s going to still be in the body I assume.
For the head, I don’t know where I should put it.
To give you some example of the code to add:
To be added in HEAD
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.css" />
To be added in BODY (preferably at the end)
<script src="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.js" data-cfasync="false"></script>
<script>
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "#343c66",
"text": "#cfcfe8"
},
"button": {
"background": "#f71559"
}
},
"theme": "classic",
"content": {
"message": "we use cookies for essential operations",
"dismiss": "OK",
"link": "(details)",
"href": "yadayada.com/privacy"
}
});
</script>
Now I can’t even say if it’s working anyway because when I add the part that should go in the BODY section (I used Footer in this screenshot but also tried Body), I get a popup on save that simply says “403 error”.
I imagined it was some issue with the content security policy script src
setting and added both the domain and the specific URL to the .js
(following these instructions) file but it still gives me the same error.
Unfortunately the generic 403
message doesn’t help me understand what’s going wrong here.#
Any idea what to do here?