How do I install a visitor ID tag on React SPA (CRA/Vite)?
On React SPA (CRA/Vite), your visitor identification tag goes in: public/index.html (CRA) or index.html (Vite) <head> or before closing </body> tag. The install itself takes minutes; the part that goes wrong on React SPA (CRA/Vite) is below.
Where the tag goes
- public/index.html (CRA) or index.html (Vite) <head> or before closing </body> tag.
- Paste your vendor’s tag snippet exactly as issued. Do not wrap it in extra script tags or reformat it.
- Publish or deploy, then verify (below) before trusting data.
What breaks visitor tracking on React SPA (CRA/Vite)?
SPA route changes don't trigger browser pageview events by default; script vendor may not track SPA navigations without custom event firing.
How do you verify the tag fires?
Build app (npm run build), open dist/index.html in browser, verify script tag loads in DevTools Network tab.
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.