Skip to main content
The highseat package renders the tracker’s script tag and gives you a typed track(). The tracker loads from cdn.highseat.com, so the install needs no secret and no server code. Replace YOUR_SITE_ID with your site’s id, which starts with site_. Site settings › Installation in the dashboard shows it, with this code already filled in.
1

Install the package

2

Add it to your root route

Inside <body>, in the root route’s component.
src/routes/__root.tsx
The component comes from highseat/react, since TanStack Start renders a React tree. The tracker counts each client-side navigation as a page view. Deploy, then verify your install. Highseat counts only your site’s own domain, so a visit to localhost does not complete the install.

Use an environment variable

Read the site id from VITE_HIGHSEAT_SITE, set for the build: Vite writes it into the bundle. With another bundler, use its public prefix.
.env
Vite writes VITE_HIGHSEAT_SITE into the bundle when it builds, so set it in the build’s environment before the deploy, as a build argument in a Docker build.

Pages that are not found

A 404 the server answers is detected on its own. A single-page app also calls track(“404”), imported from highseat, in the component its router renders for an unknown route. In TanStack Start, that component is the root route’s notFoundComponent.

Content Security Policy

Allow the ingest host in script-src and connect-src.

Without the package

Use the package in a TanStack Start app rather than a script tag in the root route. A <script> tag that React creates in the browser never runs, so a hand-written tag can fail with no error. <Highseat /> adds the tag from outside React.

Next steps

Track events

Send signups and purchases with a typed track().