Repository navigation
Description
amended 2026-11-02: the cause is the size of the inline script, not the function call. On the sampled page the loader sits in one classic inline script of 18.0 KB, over
INLINE_LOADER_MAX_CHARS(16 KB): inline text is read only up to 16 KB, and inline scripts are not passed to detection as bundles. The same loader in a script under 16 KB is detected on v0.0.159 (function call, variable, template literal or literal id; home or inner page). The original report is kept below for context.Corpus count (the 30 sites where v0.0.159 finds no Clarity that v0.0.140 found): 2 are real loaders inside inline scripts over 16 KB (this one, and one where the standard snippet is escaped text inside 41 to 72 KB inline scripts); 4 are commented-out snippets; 3 are not loaders (tracker or consent maps, one selector that checks for an existing tag); 21 are CSP entries, prose or JSON. v0.0.159 detects 1,281 of v0.0.140's 1,311 Clarity sites. The other real case seen so far is a ~465 KB inline
type="module"script importing three.js (#1539).Decision 2026-11-02: not now. Reading inline scripts over 16 KB is a design change on a hot path with a false-positive cost, for about 2 Clarity sites in 1,311 (0.15%) on this corpus. Revisit only if a corpus-wide count of real loaders in large inline scripts (all technologies, not just Clarity) shows a real tail.
Found in the v0.0.140 vs v0.0.159 corpus check for #1420 and #1422 (stored Product Hunt crawls, offline re-detect).
What happens
One sampled site loads Microsoft Clarity from an inline script on an inner page with this shape:
var script = document.createElement('script');
script.async = true;
script.src = 'https://www.clarity.ms/tag/' + clarityProject();
document.head.appendChild(script);v0.0.159 does not detect Clarity there. v0.0.140 did, but only because it matched clarity.ms anywhere in the page HTML (the whole-HTML fallback that v0.0.150 removed). The loader is real, so this is a true loss, not one of the intended removals. 1 of the 10 sampled clarity losses has this shape (the other 9 were CSP <meta> entries and prose).
The difference from the loaders detected today (#1435, #1488, #1489) is probably the concatenation: the project id comes from a function call ('…/tag/' + fn()), not a variable or a string. It is not yet confirmed whether the page position (an inner page, not the home page) also matters.
Expected
An inline script that creates a script element whose src is https://www.clarity.ms/tag/ plus any expression is detected as Clarity, on any audited page.
Original criteria (superseded):
- A fixture with the loader above (
'https://www.clarity.ms/tag/' + fn()) in an inline script detectsclarity, both on the home page and on an inner page - The same with a template literal (
`https://www.clarity.ms/tag/${id}`) and with a variable still detectsclarity -
clarity.msin a CSP<meta>, a cookie or privacy table, or prose is still not detected
nik
Acceptance Criteria
- A corpus-wide count (all technologies) of real loaders that sit only in inline scripts over 16 KB is recorded on this issue, with the false-positive candidates it would add
- If that count justifies it: a bounded read recovers those loaders using precise in-code loader patterns only (no whole-body scans), within a fixed per-page and per-audit budget, with the hostile large-inline perf tests inside their budgets
- Commented-out snippets, tracker or consent maps and CSP or prose mentions inside large inline scripts are still not detected
nik
Activity
nc9 commentedon Nov 2, 2026
Correction to the guess above: the function call is not the cause. On the sampled page the loader sits inside a single inline script of about 18 KB, and inline text is read only up to 16 KB (
INLINE_LOADER_MAX_CHARS). The same loader in a script under 16 KB is detected on v0.0.159, with a function call, variable, template literal or literal id, on the home page or an inner page.Across all 30 sites where v0.0.159 finds no Clarity that v0.0.140 found, 2 have a real loader inside an inline script over 16 KB (this one, and one where the standard snippet is escaped text inside a 41 to 72 KB inline script). The other 28 are intended: commented-out snippets, tracker lists, CSP entries and prose.
nik
[-]Tech detection: an inline Clarity loader that builds its tag URL with a function call is missed[/-][+]Tech detection: a loader inside an inline script over 16 KB is not read[/+]nc9 commentedon Nov 14, 2026
Closing as won't-do, per the 2026-11-02 decision recorded on this issue: inline loaders over 16 KB affect about 2 of 1,311 Clarity sites, so the 16 KB inline-script limit stays. Reopen if that share grows.