EU Cookie Warning
Warn web users that your website uses cookies.
EU websites are required to get their web users’ consent before serving them “cookies”. This is to comply with the EU cookie directive.
You can implement this warning on a C1 CMS Website as a pop-up (pop-under) alert which:
- informs a web user that your website uses cookies, and
- gives them a choice of accepting this by clicking the "accept" button in the alert.
For this, you’ll need to use these two addons:
With Composite.Web.Html.CountrySpecificContent, the website will detect whether a visitor to your website is from the EU. And if so, the website will show an alert using Composite.Web.Html.AcceptAlert.
To add a EU cookie warning to your website:
- From the "System" perspective, install the above-mentioned packages.
- From the "Layout" perspective, edit a page layout template.
- Insert the
Composite.Web.Html.CountrySpecificContent
function. - In the "Countries list" parameter, select the EU countries (see below).
- In the "
Content" parameter, edit content and insert the
Composite.Web.Html.AcceptAlert
function.- In the "Alert Content" parameter, write text for the alert.
- In the "Accept Button Text" parameter, change the value if necessary.
- Click "OK" in the
Composite.Web.Html.AcceptAlert
function, and then in theComposite.Web.Html.CountrySpecificContent
function. - Save the changes in the template.
If your website uses more than one page template, it makes sense to repeat Steps 2-7 for each, or do Steps 2-7 in a master layout template if any.
You can use the sample markup below to insert in the template for Steps 3-6.
<functions> <f:function name="Composite.Web.Html.CountrySpecificContent"> <f:param name="Countries"> <f:paramelement value="AT" /> <f:paramelement value="BE" /> <f:paramelement value="BG" /> <f:paramelement value="HR" /> <f:paramelement value="CY" /> <f:paramelement value="CZ" /> <f:paramelement value="DK" /> <f:paramelement value="EE" /> <f:paramelement value="FI" /> <f:paramelement value="FR" /> <f:paramelement value="DE" /> <f:paramelement value="GR" /> <f:paramelement value="HU" /> <f:paramelement value="IE" /> <f:paramelement value="IT" /> <f:paramelement value="LV" /> <f:paramelement value="LT" /> <f:paramelement value="LU" /> <f:paramelement value="MT" /> <f:paramelement value="NL" /> <f:paramelement value="PL" /> <f:paramelement value="PT" /> <f:paramelement value="RO" /> <f:paramelement value="SK" /> <f:paramelement value="SI" /> <f:paramelement value="ES" /> <f:paramelement value="SE" /> <f:paramelement value="GB" /> </f:param> <f:param name="Content"> <f:function name="Composite.Web.Html.AcceptAlert"> <f:param name="Content"> <html xmlns="http://www.w3.org/1999/xhtml"> <head /> <body> <h2> We use cookies </h2> <p> We place cookies on your computer to remember your settings and understand how people use our website. By using this site you accept this. </p> </body> </html> </f:param> </f:function> </f:param> </f:function> </functions>
Additionally, you can add a page about your privacy policy and link to it from the alert.
The countries to include
(This list may change. Please refer to the list of EU member states.)
- Austria
- Belgium
- Bulgaria
- Croatia
- Cyprus
- Czech Republic
- Denmark
- Estonia
- Finland
- France
- Germany
- Greece
- Hungary
- Ireland
- Italy
- Latvia
- Lithuania
- Luxembourg
- Malta
- Netherlands
- Poland
- Portugal
- Romania
- Slovakia
- Slovenia
- Spain
- Sweden
- United Kingdom