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:
full and privacy need your company details, saved on the Policies page. cookie and table need a completed scan. To publish the privacy policy and the cookie policy as two pages, put format=privacy on one and format=cookie on the other:
Keep them on separate pages: both render into #katla-policy. Then set the two URLs as the banner’s privacy policy and cookie policy links on the Banner page. The privacy policy links its mention of the cookie policy to the cookie policy URL set there.

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.

Style editor

On the Policies page, select Customize style on the Embed card to open the style editor. Set the font, colours, heading sizes, spacing and the look of the cookie table, and the preview updates as you go. Any setting you leave empty keeps your site’s own style. The editor saves the style with your site and adds it to the snippet as a <style> block, with every rule scoped to #katla-policy so nothing else on the page changes:
The style is part of the snippet, not of policy.js. After you change it, copy the snippet again and replace the one on your site. The WordPress plugin, the Shopify theme block and the Webflow app add the policy without this snippet, so the style editor does not reach them. Style the policy from your theme’s CSS there instead. The editor’s CSS works alongside window.KatlaPolicy below. For the same property, it wins over your classes and loses to your inline styles.

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, except the tableWrapper box: it always carries max-width:100%; overflow-x:auto, so on a phone a wide cookie table scrolls inside its box instead of widening the page. A tableWrapper style is added after those two, so it can change them.

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.