Install in TanStack Start
The loader belongs in the root shell, not a page component.
Platform guides
Put the tag in the shell component rendered by createRootRoute. The shell is server-rendered once and is not re-rendered on client-side navigation, so the tag never gets duplicated — a page component would re-inject it on every route change.
tsx
// src/routes/__root.tsx
function RootShell({ children }: { children: ReactNode }) {
return (
<html lang="en">
<head>
<HeadContent />
</head>
<body>
{children}
<script src="https://ingest.deepsync.in/t/YOUR_PROJECT_ID.js" defer />
<Scripts />
</body>
</html>
);
}Related
Still have a question?
Support is included on every plan, including Free. Tell us what you're trying to do and we'll point you at the right page — or fix the docs.
Contact support