How do I install a visitor ID tag on Gatsby?

On Gatsby, your visitor identification tag goes in: <Script> component from 'gatsby' OR customize src/html.js (fallback method). The install itself takes minutes; the part that goes wrong on Gatsby is below.

Where the tag goes

  1. <Script> component from 'gatsby' OR customize src/html.js (fallback method).
  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 Gatsby?

Default strategy loads script after page hydration; analytics scripts may miss pageviews if not configured with beforeInteractive.

How do you verify the tag fires?

gatsby build && gatsby serve, open http://localhost:9000, check DevTools for script execution.

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