# Gatsby (https://talivia.com/docs/installation-guides/gatsby)



Use Gatsby's SSR hooks so Talivia appears on every generated page.




## Add the script [#add-the-script]

Create or open `gatsby-ssr.js` and append the Talivia script to the post-body components.

```jsx
import React from 'react';

export const onRenderBody = ({ setPostBodyComponents }) => {
  setPostBodyComponents([
    <script
      key="talivia"
      defer
      src="https://talivia.com/script.js"
      data-website-id="YOUR_WEBSITE_ID"
    />,
  ]);
};
```

Replace the website ID. Use the ID from Talivia Settings -> Tracking.

Build or run Gatsby, open a page, and verify the session in Talivia.
