Troubleshooting
The four issues below cover the vast majority of install problems. Work through them in order.
1. Ad blocker or browser extension blocking the request
Symptom: The Network tab shows the POST /api/ingest/pageview request is blocked or cancelled, or there is no request at all.
What's happening: Many ad blockers and privacy extensions block requests to known analytics hostnames, including www.antlytics.com. This affects only your own testing — real visitors without extensions will usually be unaffected — but it makes verification harder.
Fix: Use the first-party proxy to route pageview requests through your own domain. Once set up, analytics traffic is indistinguishable from your own API traffic and will not be blocked.
Quick workaround while testing: Open an incognito or private window (extensions are disabled by default), or temporarily disable your ad blocker for localhost or your staging domain.
2. Wrong tracking ID
Symptom: The request fires and returns 200, but no data appears in your dashboard, or data appears in the wrong site.
What's happening: Each site in Antlytics has a unique UUID tracking ID. If the ID in your snippet does not match the site you are viewing in the dashboard, the event is recorded against a different site — or silently accepted but discarded if the ID does not match any of your sites.
Fix:
- In the Antlytics dashboard, open Settings → Tracking Snippet. Confirm the site shown in the sidebar is the one you are tracking.
- Copy the snippet directly from that page — it is pre-filled with the correct tracking ID for the selected site.
- Paste it into your site, replacing any previous snippet.
You can also find your tracking ID in Sites (the UUID column next to each site name).
3. SPA route changes not being tracked
Symptom: The first pageview is recorded, but navigating between pages in a single-page app does not generate additional events.
What's happening: The Antlytics snippet listens for the browser's popstate event, which fires when the user navigates using the browser's Back/Forward buttons or when the app calls history.back() / history.forward(). It does not automatically intercept history.pushState() calls (the internal mechanism that most SPA routers use for client-side navigation), because intercepting pushState without monkey-patching requires access to the framework's router.
Fix: Use the <Analytics /> component from @antlytics/analytics/next in your Next.js project. It adds its own route-change listener on top of the snippet behaviour. Follow the Next.js App Router guide for the recommended integration.
For non-Next.js SPAs: call window.antlyticsTrack?.() (if you expose a manual trigger) or re-fire the snippet on each route change using your router's navigation hook. Contact support@antlytics.com if you need guidance for a specific framework.
4. Snippet not firing at all
Symptom: No POST /api/ingest/pageview request appears in the browser Network tab.
Work through these checks in order:
a. Confirm the snippet is in <head>
Open your page source (Ctrl+U / Cmd+U) and search for ant_sid. If it is missing, the snippet was not rendered. Check that:
- The snippet is inside the
<head>tag, not<body>. - Your build or CMS is not stripping inline
<script>tags. - You published / deployed after adding the snippet (Webflow, Squarespace, and similar platforms require publishing before custom code is active).
b. Check for a Content Security Policy (CSP) error
Open the browser Console tab and look for an error like:
Refused to connect to 'https://www.antlytics.com/...' because it violates the following Content Security Policy directive: "connect-src 'self'"
If you see this, add https://www.antlytics.com to your connect-src directive, or switch to the first-party proxy so requests go to your own domain (which is already allowed).
c. Check the Network tab
Open DevTools → Network, reload the page, and filter by ingest. You should see a POST to /api/ingest/pageview with a 200 response. If the request is present but returns 400 or 422, check the request body — the most common cause is a malformed or missing tracking_id.
d. Check for JavaScript errors
Open DevTools → Console and look for any JavaScript errors on the page. A syntax error earlier in the page can stop the snippet from executing.
Still stuck? Email support@antlytics.com with your site ID and the URL of the page you are trying to track.