Top Quality Products

CookieInfo.js – EU Cookie Law Compliance Script

4.67
Expert ScoreRead review

$7.00

Added to wishlistRemoved from wishlist 0
Add to compare

893 sales

LIVE PREVIEW

CookieInfo.js – EU Cookie Law Compliance Script

CookieInfo.js Review – A Comprehensive EU Cookie Law Compliance Script

As the EU Cookie Law requires websites to inform visitors about cookies used on their website, CookieInfo.js offers an elegant and easy-to-use solution to ensure compliance. In this review, we’ll delve into the features, benefits, and user experience of this script to help you decide if it’s the right choice for your website.

Features and Benefits

CookieInfo.js boasts an impressive list of features that make it an attractive option for website owners. Some of its standout features include:

  1. Responsive Design: The script is optimized for smaller screens, ensuring that it looks great on various devices and browsers.
  2. Easy Customization: With a range of customizable options, you can tailor the script to match your website’s style and branding.
  3. Lightweight: Weighing in at just 3kb, CookieInfo.js is incredibly lightweight, making it easy on server resources.
  4. Easy Installation: The installation process is straightforward, requiring only a few lines of code and a CSS file.

User Experience

Using CookieInfo.js is a breeze. The script is easy to install and configure, and the documentation is comprehensive and well-maintained. The live demo showcases the script’s capabilities, and the options for customization are vast and intuitive.

Support and Updates

The developer behind CookieInfo.js, Daniel Paul, is highly responsive and committed to providing excellent support. The FAQ section is well-maintained, and the developer encourages users to contact him for any issues or questions.

Rating and Verdict

Based on our experience with CookieInfo.js, we rate it 4.67 out of 5 stars. The script is well-designed, easy to use, and highly customizable. While it may not be perfect, the developer’s commitment to providing excellent support and maintaining the script ensures that any issues are quickly resolved.

Conclusion

CookieInfo.js is an excellent choice for website owners seeking to ensure EU Cookie Law compliance in an elegant and user-friendly manner. With its lightweight design, easy customization, and comprehensive support, this script is a valuable addition to any website. If you’re looking for a reliable and efficient solution for cookie compliance, look no further than CookieInfo.js.

User Reviews

0.0 out of 5
0
0
0
0
0
Write a review

There are no reviews yet.

Be the first to review “CookieInfo.js – EU Cookie Law Compliance Script”

Your email address will not be published. Required fields are marked *

Introduction

The EU Cookie Law, also known as the ePrivacy Directive, is a European Union law that requires websites to obtain explicit consent from visitors before storing or accessing cookies on their devices. The law aims to protect users' privacy and give them more control over the information collected about them online.

To comply with this law, many websites use a script called CookieInfo.js, a popular JavaScript library that helps websites obtain consent from visitors and store cookies in accordance with the EU Cookie Law. In this tutorial, we will guide you through the process of using CookieInfo.js to ensure your website is compliant with the EU Cookie Law.

Step 1: Include the CookieInfo.js Script

To start using CookieInfo.js, you need to include the script in your website's HTML file. You can do this by adding the following code to the head section of your HTML file:

<script src="https://cdn.jsdelivr.net/npm/cookieinfo@1.4.0/dist/cookieinfo.min.js"></script>

Make sure to replace the version number (1.4.0) with the latest version available on the CookieInfo.js GitHub page.

Step 2: Configure the CookieInfo.js Options

CookieInfo.js provides several options that you can configure to customize the script's behavior. You can do this by adding the following code to the head section of your HTML file:

<script>
  CookieInfo.config({
    // Set the cookie domain
    domain: 'yourdomain.com',
    // Set the cookie path
    path: '/',
    // Set the cookie expiration date (in days)
    expires: 30,
    // Set the cookie name
    name: 'cookieinfo',
    // Set the cookie value
    value: 'true',
    // Set the cookie type (e.g., "strict", "relaxed", or "none")
    type: 'strict',
    // Set the cookie language
    language: 'en',
    // Set the cookie version
    version: '1.0',
  });
</script>

Replace yourdomain.com with your website's domain name, and adjust the other options as needed.

Step 3: Add the CookieInfo.js Button

To obtain consent from visitors, you need to add a button to your website that triggers the CookieInfo.js script. You can do this by adding the following code to your website's HTML file:

<button id="cookieinfo-button">Accept Cookies</button>

Make sure to give the button an ID of "cookieinfo-button" so that CookieInfo.js can find it.

Step 4: Trigger the CookieInfo.js Script

To trigger the CookieInfo.js script, you need to add an event listener to the button you created in Step 3. You can do this by adding the following code to your website's JavaScript file:

document.getElementById('cookieinfo-button').addEventListener('click', function() {
  CookieInfo.show();
});

This code tells CookieInfo.js to display the consent form when the button is clicked.

Step 5: Handle Cookie Consent

Once a visitor has accepted or declined cookies, CookieInfo.js will store their preference in a cookie. You can then use this cookie to determine whether to set or retrieve cookies on the visitor's device.

To handle cookie consent, you can add the following code to your website's JavaScript file:

if (CookieInfo.getConsent()) {
  // Set cookies on the visitor's device
  document.cookie = 'cookieinfo=true; expires=' + new Date(Date.now() + 30 * 24 * 60 * 60 * 1000).toGMTString();
} else {
  // Do not set cookies on the visitor's device
  document.cookie = 'cookieinfo=false; expires=' + new Date(Date.now() + 30 * 24 * 60 * 60 * 1000).toGMTString();
}

This code checks whether the visitor has accepted cookies and sets or retrieves cookies accordingly.

Conclusion

By following these steps, you can use CookieInfo.js to ensure your website is compliant with the EU Cookie Law. Remember to customize the script's options to fit your website's specific needs, and to handle cookie consent accordingly.

Here is an example of how to configure the CookieInfo.js EU Cookie Law Compliance Script:

cookieConsentTypes

cookieConsentTypes: [
  {
    "cookieName": "cookie",
    "description": "This website uses cookies to improve your browsing experience",
    "type": "necessary",
    "href": ""
  },
  {
    "cookieName": "analytics",
    "description": "We use Google Analytics to analyze website usage",
    "type": "performance",
    "href": ""
  }
]

cookieDuration

cookieDuration: {
  "necessary": 365,
  "performance": 30,
  "functional": 30,
  "other": 30
}

cookieScope

cookieScope: "all"

cookieBar

cookieBar: {
  "position": "bottom",
  "backgroundColor": "#333",
  "foregroundColor": "#fff",
  "dismissButton": "I understand"
}

cookieInfo

cookieInfo: {
  "title": "Cookie Policy",
  "description": "Our website uses cookies to provide you with a better experience. By continuing to browse the site, you agree to our use of cookies.",
  "href": "https://example.com/cookie-policy"
}

cookieAction

cookieAction: {
  "acceptAll": "Accept all cookies",
  "declineAll": "Decline all cookies",
  "manage": "Manage cookies"
}

Here are the features of CookieInfo.js - EU Cookie Law Compliance Script extracted and listed separately:

Responsive Design: Works perfectly on smaller screens. The responsive design scales down to match the screen. Try resizing your browser!

Easy to Customise: Dark or light theme, top or bottom, colours, text, buttons and many more easily configurable options.

Lightweight: Only runs where necessary. Otherwise, just sits tight in the background. Weighs only 3kb and uses the latest technology and methods for efficiency.

Easy Install: Add the CSS file, the javascript, a line of configuration and you’re done! Simple, right?

Support: In trouble? No problem, contact me using the form on my envato profile page. I’ll be happy to help you out.

Please note that the support section also includes information on how to request support, including providing additional information such as product name, URL to affected page, browser name and version, and anything else that will help generate a speedy response.

CookieInfo.js – EU Cookie Law Compliance Script
CookieInfo.js – EU Cookie Law Compliance Script

$7.00

Shop.Vyeron.com
Logo
Compare items
  • Total (0)
Compare
0