Skip to content

sprucejoy/cookie-consent-autoblock-gdpr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cookie Consent & Autoblock for GDPR/CCPA Compliance

Make your site comply with the GDPR and CCPA with 1-line js code.

What is Cookie Consent & Autoblock?

Cookie Consent & Autoblock is a lightweight Javascript to help you quickly comply with the EU Cookie Law, CCPA, GDPR and other privacy laws.

This script provides following functions:

  • An Easily Configurable Cookie Consent Banner to be displayed to info the users.
  • The tracking tags (both built-in tags and configured) will be blocked until the user accepts the policy.
  • When a user accepts the cookie policy, the Cookie Consent Banner will no longer be shown.

This script is developed by SpruceJoy, a membership app that can be easily integrated into any website with just one single line of code.


Usage

Simply copy and paste following code and paste the code BEFORE any <script> tags within the <head> area.

<script src="https://cdn.jsdelivr.net/gh/sprucejoy/cookie-consent-autoblock-gdpr/cookie-consent.js" crossorigin="anonymous"></script>

That is it! This will display a cookie consent banner on your site as well as autoblock scripts like Google Analtyics, Facebook pixel, Google Tag Manager (see built-in scripts ) setting cookie on your site.

For advanced usage, please read here.


Built-In Autoblocked Scripts

This script will automatically block following tracking codes from setting cookies:

  • Google Tag Manager
  • Google Analytics
  • Google Ads
  • Google Adsense
  • Google Publisher Tags
  • Facebook Pixel
  • Hotjar Analytics
  • Youtube embed
  • Vimeo embed
  • Google maps
  • Addthis widget
  • Sharethis widget
  • Twitter widget
  • Slideshare embed
  • Linkedin widget
  • Instagram embed
  • Pinterest widget
  • ConvertKit
  • Intercom
  • Mixpanel

Please contact us if you have some questions or you believe any tags shall be added. Thanks.


Demo

sprucejoy homepage


Disclaimer

You running this script/function means you will not blame the author(s) if this breaks your stuff. This script/function is provided AS IS without warranty of any kind. Author(s) disclaim all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall author(s) be held liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the script or documentation. Neither this script/function, nor any part of it other than those parts that are explicitly copied from others, may be republished without author(s) express written permission. Author(s) retain the right to alter this disclaimer at any time.