Skip to content
Hoot Lens.Start free

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.

Markdown copy

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

  1. 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:PORT or http://127.0.0.1:PORT.
  2. Open the page and run Hootlens.status() in the console. It returns {state, consentMode, consent, consentSource, reason}. Read state first, then reason.
  3. Open the page with ?hootlens=debug on 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.
  4. Open Installation in the workspace. The checklist shows Tag loaded, Origin matches and Data received, and lists recent problems.
  5. Check your own browser is not why nothing records: Global Privacy Control and Do Not Track always turn recording off, whatever the settings.
Table: Steps
stateMeaningNext step
recordingCapture is runningLook for the data in the workspace
loadingSettings are loading, or the tag has not startedWait, then check the tag is in the HTML and data-project is set
waiting-consentConsent is needed and was not givenAgree on the site's banner, or connect the consent platform with data-consent-source
not-targetedThis page is outside the pages you chose to recordCheck Settings, Recording, Check a page
disabledThe reason is gpc, dnt or sampled-outThe first two come from the browser; for sampled-out use a new tab or raise the sample rate while testing
pausedThe project is not accepting recordingsAsk the owner to check the project and its plan
errorThe collector refused the page, or capture could not startRead 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.

See it on your own site

Free to start. Add one line, and your first visits show up within minutes.