How do I install a visitor ID tag on Astro?

On Astro, your visitor identification tag goes in: <script> tag in .astro component template OR is:inline directive for inline script injection. The install itself takes minutes; the part that goes wrong on Astro is below.

Where the tag goes

  1. <script> tag in .astro component template OR is:inline directive for inline script injection.
  2. Paste your vendor’s tag snippet exactly as issued. Do not wrap it in extra script tags or reformat it.
  3. Publish or deploy, then verify (below) before trusting data.

What breaks visitor tracking on Astro?

Scripts are bundled by default and become render-blocking; use is:inline directive to prevent bundling if you need third-party code to execute immediately.

How do you verify the tag fires?

npm run build && npm run preview, open browser DevTools and check page source for script tags.

Then run through the labeled QA checklist before you rely on the numbers, and set expectations with the match-rate calculator — no vendor identifies every visitor.

All platform install guides