How do I verify my analytics tag installed correctly?
Load the page and run Hootlens.status() in the browser console. If the install worked it returns an object with state: 'recording'. The Hoot Lens workspace confirms it too: Installation shows "First visit recorded" once the first data arrives. If the state is anything else, the state and reason fields tell you the next step. A coding agent can run the same check with the check_install tool.
What you need
The one tag on the page, with your public project ID:
<script async src="https://hootlens.com/t.js" data-project="PROJECT_ID"></script>
The project ID is public and safe to put in a page. Put the tag in the head of every page you want to record, and keep it off signed-in and private pages. The install guide lists where the tag goes for Next.js, Vite, Nuxt, SvelteKit, Angular, Astro, Remix, Gatsby, WordPress, Shopify, Google Tag Manager and plain HTML.
Steps
- Register the site's exact origin on the project in the workspace. For testing on your computer, choose Allow localhost for testing in Installation, which allows one exact
http://localhost:PORTorhttp://127.0.0.1:PORT. - Open the page and run
Hootlens.status()in the console. It returns{state, consentMode, consent, consentSource, reason}. Readstatefirst, thenreason. - Open the page with
?hootlens=debugon the address for a small panel that shows the state, the reason, the consent mode, whether the page is targeted and the collector's last answer. It is left out of recordings. - Open Installation in the workspace. The checklist shows Tag loaded, Origin matches and Data received, and lists recent problems.
- Check your own browser is not why nothing records: Global Privacy Control and Do Not Track always turn recording off, whatever the settings.
state | Meaning | Next step |
|---|---|---|
recording | Capture is running | Look for the data in the workspace |
loading | Settings are loading, or the tag has not started | Wait, then check the tag is in the HTML and data-project is set |
waiting-consent | Consent is needed and was not given | Agree on the site's banner, or connect the consent platform with data-consent-source |
not-targeted | This page is outside the pages you chose to record | Check Settings, Recording, Check a page |
disabled | The reason is gpc, dnt or sampled-out | The first two come from the browser; for sampled-out use a new tab or raise the sample rate while testing |
paused | The project is not accepting recordings | Ask the owner to check the project and its plan |
error | The collector refused the page, or capture could not start | Read the console line: origin_not_registered means the exact origin is not on the project |
Ask your coding agent to do it
With the Hoot Lens connector at https://mcp.hootlens.com/mcp (see how to give your coding agent real user behavior data), an agent can get the exact code for your platform and then verify it. These are the exact tool calls.
list_projects {}
get_install_snippet { "projectId": "PROJECT_ID", "platform": "nextjs", "variant": "app" }
check_install { "projectId": "PROJECT_ID" }
check_install { "projectId": "PROJECT_ID", "url": "https://example.com/pricing" }get_install_snippet returns the tag, the file it goes in and the code to paste for the platform. check_install fetches the page and reports whether the tag is in the HTML with the right project ID, any Content Security Policy problem, whether the tag has loaded and the first data has arrived, and a next step. It looks only at the project's own allowed sites.
If the state is recording but nothing shows
Open Installation and read "Origin matches" and "Recent problems". A recording is listed once its first batch arrives, so push ['flush'] to send buffered data now, and look for a collect request in the network panel. Settings changes reach browsers in about 90 seconds on the next page load, so wait a couple of minutes after saving a setting, then reload.
Related
See it on your own site
Free to start. Add one line, and your first visits show up within minutes.