Documentation

Everything you need to integrate and configure Cookiewise.

Quick Start

Get Cookiewise running on your website in under 5 minutes.

1. Create an account

Sign up at cookiewise.net/register to get started with your free trial.

2. Add your website

Navigate to Domain Management and add your website's domain.

3. Scan for cookies

Use the Cookie Scanner to automatically detect all cookies on your site.

4. Add the script

Add this as the first script in your <head> tag, before any other scripts:

<script src="https://www.cookiewise.net/api/script.js?website_id=YOUR_WEBSITE_ID"></script>

Installation

Cookiewise is a hosted solution - no installation required. Simply add our script to your website.

HTML Integration

Add the following snippet as the first script after the opening <head> tag, before any other scripts:

<script src="https://www.cookiewise.net/api/script.js?website_id=YOUR_ID"></script>

WordPress

Add the script via your theme's header.php or use a plugin like "Insert Headers and Footers".

Google Tag Manager

Add a Custom HTML tag with our script and set it to fire on All Pages.

Configuration

Configure your banner directly from the dashboard or pass a config parameter in the script URL.

Dashboard Configuration

Go to Banner Configuration in your dashboard to customize colors, position, text, and behavior.

URL Configuration

You can also pass configuration via the script URL:

<script src="https://www.cookiewise.net/api/script.js?website_id=YOUR_ID&config=%7B%22position%22:%22corner%22%7D"></script>

JavaScript API

Cookiewise exposes a global window.Cookiewise object for programmatic control.

Cookiewise.showBanner()

Programmatically show the consent banner.

Cookiewise.hideBanner()

Hide the consent banner.

Cookiewise.getConsent()

Returns the current consent object: { categories: {...}, timestamp: '...', method: '...' }

Cookiewise.updateConsent(categories)

Programmatically update consent. Pass an object like { necessary: true, analytics: false }

Cookiewise.openSettings()

Open the cookie settings modal.

Events

Cookiewise dispatches custom events that you can listen for.

cookiewise-ready

Fired when Cookiewise has finished initializing.

window.addEventListener('cookiewise-ready', (e) => { console.log('Ready:', e.detail); });

cookiewise-consent-updated

Fired when user updates their consent preferences.

window.addEventListener('cookiewise-consent-updated', (e) => { console.log('Consent:', e.detail); });