Free Cookie Consent Solution

Free solution for GDPR + EU Cookies Directive (ePrivacy) cookies management

NEW! Try the new and advanced Cookie Consent solution: user consent log, geolocation detection (ie. show notice banner only when required) and more customization options. Try Privacy Consent today.

Build your Cookie Consent code

Your JavaScript scripts will be loaded automatically.

Your JavaScript scripts will be loaded only after the user clicks "I agree".

If you have a Privacy Policy, include a link to it.

This is an optional step, but you can organize your JavaScript scripts directly from this page.

For example, you can copy-paste your Google AdWords code here and select "Targeting & Advertising" and we will automatically convert your script code as required by the Cookie Consent tool.

There are four levels of cookie consent available:

  • strictly necessary (ie. account login related cookies)
  • functionality (ie. remembering users choices)
  • tracking and performance (ie. Google Analytics)
  • targeting and advertising (ie. Google AdSense, Google AdWords)

Enter the script name, select its type and copy-paste script code:

Copy your Cookie Consent code below and begin to adjust your JavaScript scripts.

Adjust your JavaScript scripts

The Cookie Consent by TermsFeed solution can be used to notify your users about your website use of cookies. The Cookie Consent solution allows your website users to communicate their privacy preferences to you.

However, it is still up to you to make sure that your website respects the choices made by your website users.

If a website user chooses not to load Advertising Cookies, you need to respect that decision.


Let's take Google Analytics as an example. As a tracking tool, Google Analytics uses cookies, and is therefore subject to the EU Cookie Directive. Google Analytics requires you to add a piece of JavaScript code to your website. With the Cookie Consent by TermsFeed you can enable or disable the Google Analytics tracking code based on what a user's specific privacy preferences is.

To do that:

  1. Organize your different JavaScript scripts into separate <script> elements. Example: your JavaScript that manages users login and users forgot password functionality should be separated from the Google Analytics <script>.
  2. For any <script> element you want to toggle through the Cookie Consent by TermsFeed solution, change type="text/javascript" to type="text/plain".
  3. Then, add a cookie-consent attribute to each element, and set the value of that attribute accordingly to the Cookie Consent levels (see below).

In the following example, there is a linked script that handles essential site functions (user sessions) and the Google Analytics tracking script. The first one will be enabled at the lowest privacy level ("Strictly Necessary"), but the second will only be activated if the user has toggled on to the "Tracking & Performance" preference.

<!-- Shopping Cart Cookies -->
<script type="text/plain" cookie-consent="strictly-necessary" src="/js/shopping-cart-sessions.js"></script>

<!-- Google Tracking Code -->
<script type="text/plain" cookie-consent="tracking"> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNod e.insertBefore(a,m) })(window,document,'script','//','ga'); ga('create', /* Google Property ID */, 'auto'); ga('send', 'pageview');

Cookie Consent Levels

Cookie Consent by TermsFeed has the following levels available:

  1. Strictly Necessary.
    Cookies related to user account login or other strictly necessary cookies that your website cannot run without.
    <script type="text/plain" cookie-consent="strictly-necessary"></script>
  2. Functionality.
    Cookies related to user account login or other strictly necessary cookies that your website cannot run without.
    <script type="text/plain" cookie-consent="functionality"></script>
  3. Tracking and Performance.
    Cookies that are used by tracking or performance tools, such as Google Analytics or live chat.
    <script type="text/plain" cookie-consent="tracking"></script>
  4. Targeting and Advertising.
    Cookies that are used by advertising services, such as Google Ads or any remarketing service.
    <script type="text/plain" cookie-consent="targeting"></script>
Live Preview