Other Articles
Managing Cookie Banners and User Preferences
Introduction
Cookie banners are an essential part of user consent management, especially for websites that use tracking technologies such as analytics, marketing, or functional cookies. They help organizations inform users about cookie usage and allow them to control their preferences in a transparent and compliant manner.
Kawach provides a configurable cookie banner solution that enables organizations to collect, manage, and store user consent for different cookie categories.
What is a Cookie Banner?
A cookie banner is a user interface component displayed on a website that:
- Informs users about the use of cookies
- Allows users to accept, reject, or customize their preferences
- Records user choices for compliance and audit purposes
It plays a key role in ensuring compliance with privacy regulations by capturing explicit and informed consent.
Configuring the Cookie Banner in Kawach
Kawach allows you to configure your cookie banner using a JavaScript configuration object and a banner script. This setup ensures seamless integration with your website.
1. Add Configuration Script
The configuration script defines how the cookie banner behaves and appears. It includes important details such as the consent endpoint, categories, and styling.
Key Configuration Elements:
-
Token
A secure token used to authenticate consent requests. This must be kept confidential. -
Banner Title & Description
Example:- We value your privacy
- We use cookies to improve your experience.
-
Endpoint
API endpoint where cookie consent is recorded:
https://in.kawach.ai/api/cookie_consent -
Consent Expiry
Defines how long the user’s consent remains valid (e.g., 365 days) -
Consent Version
Helps track changes in cookie policies. When updated, users can be prompted to re-consent.
2. Define Cookie Categories
Kawach supports multiple cookie categories, allowing users to selectively provide consent.
Typical categories include:
-
Necessary
Required for basic website functionality (always enabled) -
Analytics
Used for tracking user behavior and improving performance -
Marketing
Used for advertising and personalization -
Functional
Enhances user experience (e.g., preferences, settings)
This categorization ensures that users have granular control over what they agree to.
3. Add Banner Script
To activate the cookie banner, include the Kawach banner script in your website:
<script src="https://kawach-prod-ind-images.s3.ap-south-1.amazonaws.com/cookie_banner/v2.0.0.js"></script>
This script reads the configuration and displays the banner to users.
Managing User Preferences
Once the banner is live, users can:
- Accept all cookies
- Reject non-essential cookies
- Customize preferences by category
Each action is recorded as a consent event, ensuring traceability.
Preference Management Features
- Users can update their preferences at any time
- Consent is stored with a defined expiry period
- Changes in consent create new records (event-based tracking)
This ensures that user choices are always respected and updated.
Customizing the Banner Design
Kawach allows you to align the banner with your brand using styling options:
- Banner Background Color
- Primary Color (buttons, highlights)
- Secondary Color
- Text Color
Example:
- Background: #FFFFFF
- Primary: #155265
- Secondary: #F8F9FA
- Text: #212529
This ensures the banner integrates seamlessly with your website design while remaining visible and user-friendly.
Best Practices for Cookie Consent
To ensure effective and compliant cookie management:
- Use clear and simple language in the banner
- Avoid pre-checked options for non-essential cookies
- Provide granular control over categories
- Allow users to change preferences anytime
- Update consent version when policies change
- Ensure secure handling of consent data
Conclusion
Managing cookie banners and user preferences is a critical part of modern privacy compliance. Kawach simplifies this process by providing a flexible, secure, and customizable solution for collecting and managing cookie consent.
With features like category-based preferences, consent expiry, event-based tracking, and API integration, organizations can ensure transparency, maintain compliance, and build user trust—all while delivering a seamless user experience.
Updated on 30 March, 2026
Read More
Logging and Tracking User Consent
Understand how logging and tracking user consent works, including consent records, audit trails, and compliance benefits.
Types of User Consent
Understand different types of user consent and their importance in compliance and privacy management.
How to Configure Consent Collection
Learn how to configure consent collection in Kawach for compliance and audit readiness.