Troubleshooting
Check that it works
- On the page. The label appears on each marked element shortly after the page loads, once our API answers. "Labeled by Disclarion" becomes a link as soon as the item has a record. For text, that's right away. For a new image, it's after our server has downloaded it. label.js asks again twice, a few seconds apart, so on the first view the link may appear only on the next page load.
- Browser console. label.js logs nothing when everything works. When something is wrong, it logs exactly one line per page load, starting with
[disclarion]. The table below explains each one. - Network tab. Look for a
POSTtohttps://cdn.disclarion.com/v1/labelswith status 200. Its response lists each item'sstatusand whether it was drawn (render). See the API reference. - Dashboard. Content labeling → Labeled content lists each item. New items start as pending. They usually turn verified within seconds to a few minutes, once our server has checked the page. You can export the list as CSV.
- The verify link. It opens
https://www.disclarion.com/verify/…in a new tab. The page shows the registered hostname and page, the label, and the model if you set one.
The verify page shows one of three statuses:
- Verified: "This label is registered to your-hostname." and "Disclarion's server found this content on the page below".
- Pending: "… Verification is pending."
- Not confirmed: "We couldn't confirm this label on your-hostname."
If someone copies your labeled content to another site, the link still points to your record. A visitor arriving from that other site sees "You came here from other-site, but this label is registered to your-hostname." The label itself never says "verified".
The same checks from a terminal:
# Is the script reachable? (Use GET: a HEAD request gets 405.)
curl -s -o /dev/null -w "%{http_code}\n" https://cdn.disclarion.com/v1/label.js
# Is the marked content in the HTML your server sends?
curl -s https://www.example.com/products/linen-shirt | grep -o 'data-disclarion="[a-z-]*"'Console messages and symptoms
| You see | Why | Fix |
|---|---|---|
[disclarion] label API: unavailable | The site isn't activated yet (early access), or the service is temporarily unavailable. | Check the site's badge in the dashboard. If it says Pending activation, verify the site if you haven't, then click Request activation. |
[disclarion] label API: site_not_verified | The hostname isn't verified. | Dashboard → Check verification (script, meta tag or DNS TXT). |
[disclarion] label API: origin_not_allowed | The page's hostname isn't the site's hostname. Typical causes: www vs no www, a staging or preview host, localhost, or the code was copied to another site. | Add the hostname as its own site and use its site code there. See How hostnames are matched. |
[disclarion] label API: site_not_found | The data-site value doesn't match any site. | Copy the snippet again from the dashboard. |
[disclarion] label API: site_disabled | The site was disabled in the dashboard. | Click Enable. |
[disclarion] label API: page_url_not_on_hostname | The page address isn't on the site's hostname. | Same fix as origin_not_allowed. |
[disclarion] label API: invalid_request | A malformed request, or a page address longer than 2,048 characters. | This shouldn't happen with an unmodified label.js. If it does, write to us. |
[disclarion] label API: rate_limited | Too many requests from one visitor (60 per minute) or for one site (600 per minute). | Nothing to do for normal traffic. The next page view works. |
[disclarion] label API unreachable | The browser couldn't reach cdn.disclarion.com. Causes: your Content-Security-Policy, the visitor's network or an ad blocker. | Check your CSP. Nothing on your side helps against a visitor's blocker. |
[disclarion] missing or invalid data-site on the label.js script tag | No data-site, or a malformed site code. | Copy the snippet again. Keep data-site on the script tag. |
[disclarion] this browser lacks crypto.subtle/fetch (https pages only) | The page is served over plain http, or the browser is very old. | Serve the page over https. |
[disclarion] data-disclarion must be "ai-generated" or "ai-assisted" | A typo in the attribute value. | Use one of the two values. |
| No warning, but one element has no label | That item wasn't registered. The POST response says why: subscription_inactive, verification_lost, new_item_limit (200 new items per site per hour), page_churn or invalid_item. | Read the reason in the Network tab and look it up in the API reference. |
| Every label appears twice | label.js is included twice, for example in the template and again through a tag manager. Each copy draws its own labels. | Include it once per page. |
| Labels show, but items stay pending or fail | Our server couldn't find the content in your page's HTML. | See Caching and bot protection and Server-rendered vs. JavaScript content. |
Content-Security-Policy
If your site sends a CSP, add https://cdn.disclarion.com to two directives: script-src (to load the script) and connect-src (for its API calls).
Nothing else is needed. No 'unsafe-inline', and no style-src or img-src change. label.js styles its label through the DOM, not with inline style tags or attributes.
A complete strict example:
Content-Security-Policy: default-src 'self'; script-src 'self' https://cdn.disclarion.com; connect-src 'self' https://cdn.disclarion.comBlocked requests show up in the console as "Refused to load the script" or "Refused to connect".
If your policy uses 'strict-dynamic', browsers ignore host names in script-src. Give the label.js tag the same nonce attribute as your other scripts.
Ad and privacy blockers
Some visitors' blockers may block cdn.disclarion.com. Those visitors see your page without labels. Nothing breaks, and records created by other visitors are not affected.
If a label must reach every visitor, also say it in your own HTML, as a visible caption next to the content.
Caching and bot protection
When labels show but items stay pending or fail, our server couldn't find the content in your page's HTML. There are four common causes:
- The content was inserted by JavaScript. See Server-rendered vs. JavaScript content.
- Your CDN or page cache served an older copy. Purge it after publishing.
- The page needs a login, a paywall or a specific region.
- A bot challenge stopped our server. It fetches like an anonymous visitor, with the user agent
DisclarionLabelCheck/1.0. Allow it through your bot protection.
Performance and failure behavior
- With
async, the script downloads in parallel and never blocks your page from rendering. - It is about 15 KB (less than 6 KB compressed) and starts once the HTML is parsed.
- It sends one request per page view for up to 50 marked items. More items, or content added later, go in further requests shortly after.
- Image labels are overlays and don't move your layout.
- Text labels add a small block at the end of the marked element when they appear.
- label.js never throws errors into your page.
- If
cdn.disclarion.comcan't be reached, the script or its request simply fails. Your page loads and works as usual, without labels. - Labels are drawn only after our API answers, so no labels appear while it's unreachable. The exceptions are short text and
data:/blob:images, which are labeled without a record.