Cookie Warning Bar

The European Union makes it illegal to collect visitor info without warning them when they first land on the website.
Although it refers to cookies, it also applies to sites using analytics code such as Google Analytics and StatCounter.
Who does it apply to? Any website whose content is available to visitors residing in any of the EU countries which means virtually all websites. If a website whose owner resides outside of the EU is marketing or selling products or services which are available in EU countries, a cookie warning should be included.
Cookie Bar
This widget creates a bar which appears on page load - fixed to either the top or the bottom of the page.
The bar has warning text and an "Accept" button.
There are two more optional buttons - one for sending visitors to the website's cookie policy page and the other for dismissing cookies and disabling analytics.
The "Policy" button has a field for entering the file path to the cookie policy page. The one in the example on this page is linked to a website which gives more info about all this and offers a service to scan the site and find all the offending code.
The "Decline" button should only be used if code is put in place to disable analytics and any other data mining items. This includes YouTube movies and social media plugins such as Twitter widgets and Facebook plugins.
YouTube does have an option to "Enable privacy-enhanced mode" but this means that the embed code has to be inserted via an HTML snippet rather than using a widget. Alternately, change all embed links from to
For basic (and simple) usage, use only the "Accept" button. If the visitor clicks it, the cookie bar will slide out of view. The downside is that visitors who don't want their privacy invaded will leave the site.
Adding the "Policy" button - linked to a webpage with info about what data is being collected - will allow cautious visitors to be informed and then, hopefully, continue to browse the site
The "Decline" button should only be used if code has been added to disable ALL code - internal and external - which collects visitor data.
As mentioned above, this applies to analytics, YouTube movies, social media plugins and so on …
Disable Analytics
If the "Decline" button is used, all offending scripts need to be wrapped in an "if" statement like this …

if(jQuery.cookieBar('cookies')){ //Google Analytics or social media widget or plugin code }

The widget javascript will take care of the actual disabling.
Overlay Message
If a cookie warning is not required on the site, the widget can also be used on any page to display a closeable message with a link by leaving the "Force Show" box checked.

EverWeb Widgets