Cookie banner
This component is currently experimental because more research is needed to validate it.
Allow users to accept or reject cookies which are not essential to making your service work.
When to use this component
Use this component if your service sets any cookies on a user’s device.
- tell users about the cookies your service sets on their device
- let users accept or reject any cookies that are not essential to providing your service
The term ‘non-essential cookies’ includes:
- HTML5 local storage
- service workers
- any other technologies that store files on the user’s device
This cookie banner and the cookies page pattern were defined after we've done extensive research on the best practices on how to get cookie consent used on various GOV.GR services.
This component page shows several options for using a cookie banner, based on the types of cookies you’re using in the service. We also tell you what to cover in your cookie banner, with some text examples.
Before you start
Audit and categorise your cookies as shown in the cookies page pattern to help you choose the best option for your service.
You must not take the information on this page as legal advice. Your organisation is responsible and accountable for what they do to comply with data protection legislation, such as:
- Privacy and Electronic Communications Regulations (PECR)
- General Data Protection Regulation (GDPR) Check with your organisation’s privacy expert to see how data protection legislation affects your website and service.
How it works
Show the cookie banner every time the user accesses your service until they either:
- accept or reject cookies using the buttons in the cookie banner
- save their cookie preferences on the service’s cookies page
Once the user has accepted or rejected cookies, the cookie banner should:
- hide the cookie banner message
- show a confirmation message — and a ‘hide’ button to let the user close the banner
- set a cookie to save the user’s preferences for 1 year
Make sure the cookie banner does not:
- show when the user visits again, once their preferences have been saved
- set any non-essential cookies unless the user accepted them on a previous visit
Position the cookie banner after the opening <body>
tag and before the ’skip to main content‘ link.