Skip to main content
The Katla policy embed renders a fully localized cookie or privacy policy directly on your website using a lightweight JavaScript snippet.

Basic embed

Add the following HTML to any page where you want the policy displayed:
Replace {siteId} with your site ID. The script fetches the policy content and renders it inside the #katla-policy element.

Formats

Control which policy content is rendered with the format query parameter:

Locale

Set the language with the locale query parameter:
When no locale is specified, the script auto-detects the visitor’s browser language and falls back to English.

Custom styling

You can apply CSS classes and inline styles to every generated HTML element by setting window.KatlaPolicy before the script loads.

Supported element keys

All keys are optional. Omitted keys produce elements with no class or style attributes.

Using CSS classes

Ideal for Tailwind or other utility-first frameworks:

Using inline styles

For sites without a CSS framework:

Combining classes and styles

Both classes and styles can be used together. When both are set for the same element, both the class and style attributes are applied:

JavaScript API

After the script loads, window.KatlaPolicy exposes the following methods:

Direct URLs

Policy content is also available as standalone files: All direct URLs accept the same locale and format query parameters.