Docs / label.js
Label AI content with label.js
label.js adds a standard "AI-generated" label to the text and images you mark on your website, and keeps a public record of each one.
1. Add your site
Sign up (free, no card) and create a project. Then open the project, go to Content labeling and add your site's hostname. Use exactly what your browser's address bar shows, for example www.example.com.
2. Paste the script tag
Copy the script tag from the dashboard (Show setup) and paste it into the <head> of every page. Publish your site, then click Check verification.
<script src="https://cdn.disclarion.com/v1/label.js" data-site="site_YOUR_SITE_CODE" async></script>Not sure where to paste it? See the platform guides for WordPress, Webflow, Squarespace and others.
3. Mark your AI content
Add data-disclarion="ai-generated" to the element that holds the AI text, or to the image itself. Put only the AI-written text inside it.
<div data-disclarion="ai-generated">
<p>A relaxed linen shirt in a warm sand tone, cut for hot days.</p>
</div>
<img src="https://www.example.com/images/hero.png" alt="Linen shirt"
data-disclarion="ai-generated">Use ai-assisted instead if a person edited the content; the label then reads "AI-modified". You can also name the model, for example data-disclarion-model="gpt-image-1"; it then appears on the label's public record.
More on what to put inside the marked element, and on images: Marking content.
4. Check it
Reload your page: a small "AI-generated" label appears on each marked item. In the dashboard, the item appears under Labeled content, first as Pending, then as Verified.
If nothing appears, check that your site shows Active since a date in the dashboard.
Good to know
- Your pages must use https. Hostnames and verification
- One hostname is one site.
example.comandwww.example.comare different sites. How hostnames are matched - The AI content must be in the page source. Content added later by JavaScript gets a label but can't be verified. How to check
- No cookies, and no visitor data stored. What label.js sends
- Nothing breaks if our service is unreachable. Your page loads as usual, just without labels. Troubleshooting