The Free Easy Consent Banner

Lightweight, zero-dependency, and fully compliant with Google Consent Mode v2 and DataLayer. Give your users clarity with service-based consent.

License Size

πŸ‘‡ Try the live demo running on this page

Why Keksly?

Built for performance, compliance, and developer happiness.

πŸš€

Zero Dependencies

Pure Vanilla JS. No React, Vue, or jQuery required. Just drop it in and it works.

πŸ›‘οΈ

Google Consent Mode v2

Built-in support for Advanced Mode. Automatically maps services to GCM signals like ad_storage.

πŸ”§

Service-Based

Users consent to specific services (e.g., "Google Analytics") rather than vague categories.

🎨

Fully Customizable

Configure colors, fonts, texts, and positions to match your brand identity perfectly.

🚫

Script Blocking

Easily block third-party scripts until consent is granted with a simple attribute change.

πŸ“±

Responsive

Designed to look and work great on all devices, from mobile phones to large desktops.

Installation

Get up and running in seconds.

Option 1: CDN (Recommended)

Add this to your <head> tag:

<script src="https://cdn.jsdelivr.net/gh/speetzial/Keksly@main/keksly.js"></script>

Option 2: Self-Hosted

Download and host it yourself:

<script src="/path/to/keksly.js"></script>

Configuration

Define your services and customize the design.

<script>
  window.KekslyConfig = {
      services: [
          {
              id: 'google_analytics',
              name: 'Google Analytics',
              description: 'Tracks website usage.',
              category: ['analytics_storage'] // Maps to GCM
          }
      ],
      design: {
          primaryColor: '#3b82f6',
          position: 'bottom',
          buttons: [
              { type: 'accept', label: 'Accept All', variant: 'primary' },
              { type: 'reject', label: 'Reject All', variant: 'secondary' },
              { type: 'settings', label: 'Customize', variant: 'text' }
          ]
      }
  };
</script>

Service Options

Property Type Description
id string Unique identifier (e.g., 'google_analytics')
name string Display name shown to the user
category string[] Array of GCM types (e.g., ['ad_storage'])
required boolean If true, user cannot disable this service

Button Customization

Define the order and style of buttons via design.buttons.

Property Type Description
type string Action: 'accept', 'reject', or 'settings'
label string Text to display on the button
variant string Style: 'primary', 'secondary', or 'text'