Cookie consent.

User 371172 Photo


Registered User
19 posts

As a victim of EU bureaucracy I need to put a pop up cookie consent into my RSD site (because I'd like to use google analytics). Has anybody done this? Or, if I'm extra lucky, can anybody point me at a Tutorial?
Cheers JP
JP
Cat herder and Fog platter.
User 187934 Photo


Senior Advisor
18,544 posts

Here's one way.
http://www.primebox.co.uk/projects/jquery-cookiebar/
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
http://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
http://progrower.coffeecup.com/shop/
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 271657 Photo


Senior Advisor
3,816 posts

These look easy:
https://cookie-script.com/
https://silktide.com/tools/cookie-consent/
I love deadlines. I like the whooshing sound they make as they fly by. (Douglas Adams)
https://www.callendales.com
User 78051 Photo


Registered User
199 posts

User 371172 Photo


Registered User
19 posts

Ok - I'm a complete newbie when it comes to tinkering with code but....... I downloaded the 'primebox version'.

I uploaded the jquery.cookiebar.css to my css folder
I uploaded the jquery.cookiebar.js to my js folder
There is already a version of jquery-1.11.0.min.js in the js folder

I edited the script to read:

<script type="text/javascript" src="/js/jquery.1.11.0.min.js"></script>
<script type="text/javascript" src="/js/jquery.cookiebar.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$.cookieBar();
});
</script>

I also tried using the following script because I'm not sure if RDS uses $(document).ready()

<link rel="stylesheet" type="text/css" href="/css/jquery.cookiebar.css" />
<script type="text/javascript" src="/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="/js/jquery.cookiebar.js"></script>
</script>

and added that to the head section on the settings page.
I exported the site and uploaded

I also tried adding an HTML element and adding the code, changing the Tag to 'Header'.

And nothing - no cookie bar. I'm missing something, probably very simple but, fundamental. What is it?

regards JP

JP
Cat herder and Fog platter.
User 187934 Photo


Senior Advisor
18,544 posts

Try placing the script in the footer. Otherwise can you share a link to the page?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
http://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
http://progrower.coffeecup.com/shop/
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 371172 Photo


Registered User
19 posts

Tried the footer ..... no different. Gone back to sticking the script in the header. The site is commercially sensitive at the moment so would rather not share it. I could email a link?
JP
Cat herder and Fog platter.
User 187934 Photo


Senior Advisor
18,544 posts

Make a test page and share that.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
http://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
http://progrower.coffeecup.com/shop/
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 371172 Photo


Registered User
19 posts

I've added the same code to my business site at www.no-snagz.com. Plus a little scripting to get at the options but it should work......... The script was added via the settings header section. The jsquery code is in the footer (added by RSD as default) so I didn't add a second reference to that.

Regards JP
JP
Cat herder and Fog platter.
User 187934 Photo


Senior Advisor
18,544 posts

Try moving this to the footer.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="jquery.cookiebar/jquery.cookiebar.js"></script>
<script>
var jQ = $.noConflict(true);
jQ(document).ready(function(){
jQ.cookieBar({
message: 'We use cookies to track usage and preferences', // Text description on cookie bar
acceptButton: true, // Display 'accept cookies' button, false to remove - not recommended
acceptText: 'I Understand', // Accept button text
policyButton: true, // Display 'privacy policy' button, false to remove
policyText: 'Privacy Policy', // Privacy policy button text
policyURL: 'page3.html#privacy', // Link to websites privacy policy page
autoEnable: true,
acceptOnContinue: false,
acceptOnScroll: 500,
expireDays: 365, // Cookie consent bar cookie lifespan
forceShow: true, // True to always show bar - handy for when developing and styling the bar - False to hide
effect: 'slide', // Either slide or fade
element: 'body',
append: false,
fixed: true, // Cookie bar fixed, true or false. We don't recommend false but can be tested depending on your site layout
bottom: true, // Fix bar to bottom of page with 'false'
zindex: '99999' // Cookie bar z-index
});
});
</script>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
http://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
http://progrower.coffeecup.com/shop/
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.