Adding code to a website
Posted: Sat Apr 28, 2018 8:08 pm
Hiya,
I found a nice bit of code for a cookie consent (I know there is one for this software but I wasn't sure how customised I could get it to match a website I'm recreating) - but the instructions are to place it before the </head> tag - I've tried a few of the options on 'insert html' and nothing seems to be appearing. I tested it out on another software and it appears fine so I must be doing something wrong.. Or perhaps it wouldn't be supported?
Here's the code:
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
<script>
window.addEventListener("load", function(){
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "#232323"
},
"button": {
"background": "#f4cc22"
}
},
"content": {
"message": "We use cookies to track usage and preferences.",
"dismiss": "I Understand",
"link": "Privacy Policy",
"href": "http://www.malcolmdown.co.uk/privacypolicy.html"
}
})});
</script>
Many thanks!
Esther
I found a nice bit of code for a cookie consent (I know there is one for this software but I wasn't sure how customised I could get it to match a website I'm recreating) - but the instructions are to place it before the </head> tag - I've tried a few of the options on 'insert html' and nothing seems to be appearing. I tested it out on another software and it appears fine so I must be doing something wrong.. Or perhaps it wouldn't be supported?
Here's the code:
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
<script>
window.addEventListener("load", function(){
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "#232323"
},
"button": {
"background": "#f4cc22"
}
},
"content": {
"message": "We use cookies to track usage and preferences.",
"dismiss": "I Understand",
"link": "Privacy Policy",
"href": "http://www.malcolmdown.co.uk/privacypolicy.html"
}
})});
</script>
Many thanks!
Esther