# Remix (https://talivia.com/zh-CN/docs/installation-guides/remix)



使用根文档，让每个路由都包含追踪器。




## 添加脚本 [#添加脚本]

打开 `app/root.tsx`，将代码片段放在 Remix 的 `Scripts` 组件之前。

```tsx
import { Links, Meta, Outlet, Scripts, ScrollRestoration } from '@remix-run/react';

export default function App() {
  return (
    <html lang="en">
      <head>
        <Meta />
        <Links />
      </head>
      <body>
        <Outlet />
        <ScrollRestoration />
        <script defer src="https://talivia.com/script.js" data-website-id="YOUR_WEBSITE_ID" />
        <Scripts />
      </body>
    </html>
  );
}
```

请替换网站编号。

从 Talivia 的“设置 → 数据追踪”复制编号。

打开一个路由，并确认 Talivia 收到了会话。
