{"repo":"undergroundwires/ez-consent","free":true,"listed":false,"github":"https://github.com/undergroundwires/ez-consent","clone":"git clone https://github.com/undergroundwires/ez-consent.git","description":"🍪 Minimal & vanilla JS only cookie consent banner with no dependencies with Google consent mode support","language":"JavaScript","stars":23,"topics":["cookie-consent","gdpr","cookie-banner","privacy","cookie-consent-banner","cookie-law","compliance-as-code","consent-mode","google-tag-manager"],"license":"MIT","category":"self-hosted-apps","readme_excerpt":"ez-consent A minimal, vanilla JavaScript cookie consent banner with no dependencies. - Vanilla JavaScript only ✔️ - It does not track you ✔️ - Very lightweight with no dependencies ✔️ - Single line to get started ✔️ - Everything customizable, including language ✔️ - Supports Google consent mode ✔️ Examples: - Live example 1 - Live example 2 - CodePen examples Usage Quick Start: CDN The simplest way to get started is to add it to your page: See Initialize the script for additional options and alternative ways. top↑ Advanced Usage 1. Import 2. Initialize 3. Style (optional) 1. Import Here are some examples how you can install the script: - Using NPM: npm install ez-consent --save - Or using yarn: yarn add ez-consent - Using git submodule (not recommended): - Go to the folder you wish to have the repository - Run git submodule add https://github.com/undergroundwires/safe-email Add it to your page: Or you can import ez consent as a module: Or import it via webpack , gulp , rollup etc.: top↑ 2. Initialize When importing a script using the element, it's recommended to use the onload attribute to initialize it. This approach allows you to use defer attribute, which improve webpage performance and user experience by optimizing script loading. This can help your pages rank better in search engines. Or, you can initialize later using this snippet: See all options: The banner will be shown if the user has not yet agreed to read & understand the information. You can force the banner to a","default_branch":null,"files":null,"tree":[],"storefront":"/r/undergroundwires","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/undergroundwires/ez-consent/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}