Platform guides
Add the script
Copy the snippet from the dashboard: Content labeling → your site → Show setup. It looks like this, with your own site code:
<script src="https://cdn.disclarion.com/v1/label.js" data-site="site_YOUR_SITE_CODE" async></script>- Put it on every page that has AI content, once per page.
- The best place is the
<head>of your shared layout or template. Before</body>works too. - Keep
async, and keepdata-siteon the same tag. - Load the file from
cdn.disclarion.com. Don't copy it into your own bundle or host it yourself: label.js sends its requests to the host it was loaded from.
Versions
/v1/label.js is always the latest 1.x release. We recommend this URL.
Within v1, changes are backward compatible only. The file is cached for 5 minutes, so fixes reach your pages within about 5 minutes.
Pinning with Subresource Integrity
If your security policy requires SRI, load an exact release instead. Released files never change.
Use integrity only with a pinned URL (label-X.Y.Z.js). Never put it on /v1/label.js: when that URL moves to a new release, the hash no longer matches, the browser blocks the script and your pages show no labels.
Every release and its hash is listed at cdn.disclarion.com/v1/versions.json.
<script
src="https://cdn.disclarion.com/v1/label-1.1.0.js"
integrity="sha384-CFQCxb6vt/FfJjM/ooQQxiV4TLS8RfBpKfXj/5RoMjVXhNHpWz7/703r1LhTieVu"
crossorigin="anonymous"
data-site="site_YOUR_SITE_CODE"
async></script>A pinned page doesn't get fixes until you change the version.
Your platform
Where to paste the snippet, and how to add the attributes, on each platform.
Plain HTML
Paste the snippet into the <head> of every page, or into your shared header include.
Add the attributes to your elements as in the Quickstart examples.
WordPress (self-hosted, on your own domain)
Add the snippet to your theme's header: in a child theme's header.php, before </head>. A plugin that inserts code into the site header works too.
To mark content, add a Custom HTML block in the block editor and write the marked element there. For example, a <div data-disclarion="ai-generated"> around the AI text, or an <img> with the attributes.
If you use a caching plugin, clear its cache after publishing.
Webflow, Squarespace and similar builders
Paste the snippet where the builder lets you add code to the site's <head>:
- Webflow: Site settings → Custom code → Head code.
- Squarespace: the Header field of Code Injection.
Builders usually allow custom code only on paid plans.
To mark content, use the builder's custom attributes where it has them. In Webflow, select the element → Settings → Custom attributes, with name data-disclarion and value ai-generated. Otherwise, use an embed or code block containing the marked HTML.
The builder's own subdomain (webflow.io, squarespace.com) can't be verified. Connect your custom domain and add that hostname.
Next.js (App Router)
Put a plain <script> tag in the root layout, the same way disclarion.com does:
// app/layout.tsx
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
{children}
<script src="https://cdn.disclarion.com/v1/label.js" data-site="site_YOUR_SITE_CODE" async />
</body>
</html>
);
}Mark content in Server Components, so it's in the server HTML:
// app/products/linen-shirt/page.tsx (a Server Component)
export const description = "A relaxed linen shirt in a warm sand tone, cut for hot days and easy layering.";
export default function Page() {
return (
<main>
<h1>Linen shirt, sand</h1>
<div data-disclarion="ai-generated" data-disclarion-model="gpt-5">
<p>{description}</p>
</div>
</main>
);
}Content a Client Component loads in the browser after the page loads is labeled but not verified. See Server-rendered vs. JavaScript content.
For images, a plain <img> with the attributes is the simplest case.
React single-page apps (Vite, Create React App)
Put the snippet in index.html.
Content rendered in the browser is labeled but never verified. Prerender the pages with AI content, or use the Python SDK from your backend.