Troubleshooting
Data not showing up? Work through this checklist in order — it covers the vast majority of setup issues.
1. View Page Source
Go to your live website, right-click, and select "View Page Source." Search the page (Ctrl+F / Cmd+F) for tracker.js. If you find your snippet, the script tag is correctly in place.
2. Check the Network Tab
Open your browser's Developer Tools (F12), click the Network tab, and refresh the page. You should see a request to tracker.js with a 200 status. This confirms your site is successfully reaching your diy-analytics deployment.
3. Check the Console
While in Developer Tools, check the Console tab for red error messages. The tracker logs specific, actionable errors:
| Console message | Cause | Fix |
|---|---|---|
Missing site-id parameter | The script tag's site-id query param is missing or empty. | Copy the full snippet from the project's Settings page — don't edit the URL by hand. |
Invalid site-id | The site-id doesn't match any project's tracking code. | Confirm the project still exists and its tracking code wasn't regenerated. |
Domain not authorized for tracking | The page's hostname doesn't match the project's configured URL. | Update the project's URL in Settings so it matches the domain you're deploying to (including any staging subdomains you want tracked separately). |
| No data, no console errors | A Content Security Policy is blocking the request. | Add your diy-analytics domain to script-src and connect-src in your site's CSP. |
4. Disable Ad-Blockers
Some aggressive ad-blockers and privacy extensions block requests that look like analytics beacons, even self-hosted, first-party ones. Temporarily disable them on your site to rule this out.
5. Give it a minute
Dashboards aren't always instant. If everything above checks out, wait a few minutes and refresh — data can take a short time to appear after the first pageview.
Still stuck?
Open an issue on the GitHub repository with the console error (if any), your deployment platform, and whether you're tracking a single-page app.