Installation
Gatsby
Install Talivia in a Gatsby site.
Use Gatsby's SSR hooks so Talivia appears on every generated page.
Add the script
Create or open gatsby-ssr.js and append the Talivia script to the post-body components.
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.