Introducing CookieManager


(Scott Frankel) #22

Hi Paul,
Well done with your site.
What Stack did you use for the cookie revoke button?
I think I understand the setup for the initial accept cookie button but not sure about the revoke. Is done using the Gateway or CookieManager stack?
Thanks for your help, maybe a screen shot of your RW edit page will be a huge help for us who are struggling to get our heads around it all.
Cheers Scott


(Will Woodgate) #23

You can use the CookieManager to delete a named cookie. Gateway mostly plays the role of displaying a friendly privacy message to your website users and provides the initial button to opt-in.

I would have thought the example RW7 project file would be even more useful? It gives a working example of CookieManager, plus other stacks like Gateway, TopBox, FloatingContent and AlertBar. Pretty-much copy and paste examples you can take and instantly reuse in your own websites - with full instructions of how it all works. The examples all work in RW7 preview for testing. People tell me it helped them loads. If you have not received your copy yet, please email me via the website (see the opening post of this thread).


(George Peacock) #24

I have got this stack to work well now. Issue was that I was setting Gateway to hide automatically after eg 20 seconds. My thinking being that that was enough time to make a visitor aware they could accept/decline cookies.

However in this mode it does not set Cookie Manager in the way I had expected. If you use Gateway as probably intended and have it so the user needs to accept (or click the close button)then the combination works well.

It’s a great combination and well done to Will and Stacks4Stacks.


(Scott Frankel) #25

Hi Will,
Thanks, just got the CookieManager and Gateway stacks and setting up now omg first site.
I want to use a button to close and acknowledge, I’m using Foundry and want to use Button stack but can’t see a way to set the class attribution in the Button stack. How do I achieve that please, or do I need another stack?

Trying to following your instructions from your help page as below…but struggling.

Thanks
Scott

"Providing the code you are using enables you to add class selectors onto buttons, you can sometimes use an existing form submit button to close the Gateway stack and start the cookie tracking. All that is required is to add a class attribute to the button or link, with a value of GatewayClose. So in the example of a normal link, this is the HTML code you would use:

Click here to close the Gateway stack.
If you wanted a form button to also act as a close mechanism for the Gateway stack, typically you would use code similar to this:

Close Gateway


(Don) #26

I don’t have CookieManager to confirm, but the way I’m reading that is that you need to add a custom attribute in the link box that comes up when adding the link to the Foundry button. Name the custom attribute “class” with a value of “GatewayClose”.


(Scott Frankel) #27

Hi Will,
Sorry also meant to ask about your RW project file. I can’t see a link for it on either the Gateway or CookieManager pages and it isn’t in the either of the stacks download packages either.
Can you please provide a link.
Many thanks for your help.
Cheers Scott


(Scott Frankel) #28

Hi Don,
Thanks for the advise…like this do you mean?

Cheers Scott


(Don) #29

@scottjf, that’s close.

You need to change the name of the custom attribute from “title” to “class”.

Personally, I’d leave the title attribute and give it a value like “Acknowledge Cookie Policy” and add another attributes named “class” and give it the “GatewayClose” value.


(Scott Frankel) #30

Hi Don,
Great thanks, can I ask why you’d do it this way?
“Personally, I’d leave the title attribute and give it a value like “Acknowledge Cookie Policy” and add another attributes named “class” and give it the “GatewayClose” value”.

Also, not sure if you can help on another question.
How do I implement this so that visitors to the website don’t have the message popping up on each page and have to acknowledge the cookie message on each time? Basically so if ticked on any page it is a site wide acknowledgement…if you get my meaning.

Many thanks
Scott


(Don) #31

Scott, I’ve always been under the impression that using the Title attribute on links was helpful. I did a little research after you posted and discovered that it is much less necessary and sometimes not recommended.

At one point, Google and other search engines would index that text and take it into account for ranking. It sounds like this is no longer the case.

Some web browsers show the title as a tool tip when hovered over. This can be helpful, if the button/link title could use a little more explanation about where the user is headed. This is much more common with browsers for visually impaired.

Given this newer information, you may not need (or want) to add the title tag to a button link, but it may be something to evaluate on a case by case basis. You can Google “HTML link title” for more information.

I don’t have CookieManager, so I can’t really help with details of site-wide implementation. My guess is that if it’s on each page, then it will look for the cookie and display/not display accordingly. Using a Stack’s Partial should make that pretty easy to add and later modify as needed.