Basic embed
Add the following HTML to any page where you want the policy displayed:{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 theformat query parameter:
Locale
Set the language with thelocale query parameter:
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 settingwindow.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
Bothclasses 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.