Troubleshooting: analytics not tracking
Why visits or events don't show up in Linqry, and how to fix each cause, from the snippet to server-side API errors.
Start here: check the live view
Open your site in a normal browser tab (not a headless or automated browser), then open Realtime in Linqry. A working install shows your visit within a few seconds. Until the first page view arrives, the Install page says Waiting for your first pageview… and switches to Receiving data by itself.
Don’t rely on the browser’s network tab: the browser endpoint /api/collect answers 204 whether it stored the event or rejected it, so a 204 doesn’t prove the event was counted.
The snippet isn't loading
Compare your page’s HTML with the snippet on the Install page:
<script>window.linqry=window.linqry||function(){(window.linqry.q=window.linqry.q||[]).push(arguments)}</script>
<script defer data-website-id="YOUR_SITE_ID" data-domain="yourdomain.com" src="https://linqry.com/t.js"></script>| Check | Why it matters |
|---|---|
data-website-id | Must be this site's ID, copied from the Install page. Events for an unknown ID are dropped. |
data-domain | Optional, but if set it must be the site's domain or an allowed host, or every event is rejected. |
| Deployed page | Check the live page source, not your local template. Caching plugins and CDNs can serve an old version. |
| Content Security Policy | If your site sends a CSP header, it must allow linqry.com in script-src (for t.js) and connect-src (for /api/collect). |
Events come from a host Linqry doesn't accept
Browser events are accepted only from the site’s registered domain, its subdomains and the extra hosts listed under Settings → General → Additional hosts. A leading www. is ignored. Everything else, including a preview deployment on a different domain, is dropped.
Visits from localhost and other loopback addresses aren’t recorded. To test before launch, deploy to a staging host and add it under Additional hosts (up to 20 hosts).
Some visitors are missing
| Cause | What happens |
|---|---|
| Ad and tracker blockers | Extensions and browsers that block analytics scripts stop t.js from loading, so those visitors aren't counted in any report. |
| Bots and automated browsers | Known crawlers, link previews, uptime monitors and headless or automated browsers (Puppeteer, Playwright, Selenium, Lighthouse) are filtered in the browser and again on the server. |
| Your own opt-out | If you ran localStorage.linqry_ignore = "true" on your site, that browser sends nothing. Remove the key to be counted again. |
| Excluded paths | Pages matching data-exclude patterns, such as /admin/*, send nothing. |
Different tools also count differently. If Linqry and another tool disagree, see why analytics numbers differ.
Single-page app route changes are missing
The tracker records a page view on history.pushState, replaceState and popstate, which covers the routers in Next.js, React Router, Vue Router, SvelteKit and similar. If your app navigates by changing only the URL hash (/#/pricing), add data-hash-routing to the script tag; without it, hash-only changes are not counted as navigations.
<script defer data-website-id="YOUR_SITE_ID" data-hash-routing src="https://linqry.com/t.js"></script>
Custom events don't show up
| Check | Detail |
|---|---|
| Event name | 1–64 characters of letters, numbers, spaces and _ . : / -. Names with other characters are dropped. |
| Properties | Up to 20 keys, keys up to 64 characters, values up to 256 characters. |
| Timing | Calls made before t.js loads are queued by the first line of the snippet. Without that line, an early window.linqry() call fails. |
| Where to look | Events appear under Top custom events on the dashboard, in the live event stream and in visitor timelines. |
If a goal or funnel built on the event still reads 0, check the matching rules in funnels and goals.
Server-side calls fail
/api/track and /api/revenue return real errors as JSON. The common ones:
| Status | Code | Usual cause |
|---|---|---|
| 401 | unauth | Missing or wrong write key, or a site ID that doesn't match the key. Send Authorization: Bearer <key> or x-linqry-key. |
| 403 | host_not_allowed | The url you sent is on a host that isn't the site's domain or an allowed host. |
| 400 | bad_input | Invalid body: a bad event name, revenue that isn't a number of cents, or a ts more than 7 days away (/api/revenue). |
| 413 | too_large | Body over 16 KB. |
| 429 | rate_limited | Too many requests; retry after a second. |
A server-side event carries only the url and referrer you send, so revenue sent without them is reported as direct. The full reference is on the HTTP API page.
The dashboard says it's paused
When a site’s trial ends or its subscription lapses, the dashboard, share links and embeds pause until the owner subscribes from the Billing page. The tracker keeps collecting events in the meantime, so no data is lost.
Still stuck?
Contact support from the contact page with your site’s domain, the page URL you tested and the time of the test.