# Installation (https://talivia.com/docs/install)



Installation has two useful steps: add the tracker to your site, then connect the payment system that creates revenue.

## Step 1. Install the tracker [#step-1-install-the-tracker]

The Talivia tracker works anywhere you can add a script tag. Start with the universal snippet, then use a framework guide only when you need exact placement for your stack.

### Universal snippet [#universal-snippet]

In the app, open the website, go to **Settings -> Tracking**, and copy the snippet generated for that website.

```html
<script
  defer
  src="https://talivia.com/script.js"
  data-website-id="YOUR_WEBSITE_ID"
  data-domain="example.com"
></script>
```

Always copy the snippet from your website settings. Replace YOUR\_WEBSITE\_ID with the real ID from Talivia Settings -> Tracking. Do not reuse the example value.

Place the snippet before the closing `</body>` tag, or load it through your framework's shared document/layout component.

Talivia Cloud usually includes `data-domain` in the generated snippet. A website running on one hostname also works without it, but keeping the generated value lets the root website and its subdomains share the same visitor and 30-minute rolling session. You do not need to add or remove this attribute manually for a normal installation.

If your flow crosses to a different root domain, add the owned domains under **Settings -> Attribution** and copy the refreshed snippet.

Tracking overview

See what the script records automatically and which runtime functions it exposes.

Tracker configuration

Understand optional script attributes, storage, filtering, and collection settings.

Subdomain tracking

Keep one visitor identity across a root website, app, docs, and checkout.

### Framework and builder guides [#framework-and-builder-guides]

If your site uses a framework, CMS, ecommerce platform, or no-code builder, open the guide below for the exact place to paste the same snippet. Framework examples focus on placement and may omit optional attributes, so use the complete code generated in **Settings -> Tracking**.

Next.js

App Router and shared layouts.

React

Vite, CRA, and static HTML shells.

Vue

Vue apps and shared HTML entry points.

Nuxt

Nuxt app head and plugin setup.

Angular

Workspace index.html or runtime injection.

SvelteKit

Global app template placement.

Astro

Base layouts and content sites.

Remix

Root document and Scripts component.

SolidStart

Root document setup.

Qwik

Root layout and head placement.

Gatsby

SSR document hooks.

Expo

Expo Web and static HTML.

Laravel

Blade layouts and shared app views.

Django

Base templates and inherited pages.

Ruby on Rails

Application layout and ERB templates.

Express

EJS, Pug, or static HTML shells.

NestJS

Server-rendered templates or static clients.

Flask

Jinja base templates.

Phoenix

Root layouts and LiveView pages.

WordPress

Theme footer, child themes, or snippet plugins.

Shopify

Theme layout and storefront pages.

Wix

Dashboard custom code settings.

Webflow

Site custom code and project settings.

Squarespace

Code injection for all pages.

Framer

Custom code before body end.

Tilda

Site-wide HTML before body close.

## Step 2. Connect payments [#step-2-connect-payments]

Traffic only becomes useful revenue analytics after Talivia can see payment events. Choose the payment path that matches your checkout.

Stripe

Connect a restricted API key and let Talivia configure webhooks.




Yolfi

Connect the account and configure the Checkout Session return URL.

LemonSqueezy

Use provider events when LemonSqueezy powers checkout.




Polar

Use Polar payment events when your product sells through Polar.




Dodo Payments

Connect one API key; Talivia creates the payment and refund webhook.




Manual Payment API

Send payments from your backend or custom processor.

For hosted providers that expose a unique checkout return ID, configure that provider's return
placeholder. For custom payment flows, pass `window.talivia.getSessionId()` as supported provider
metadata or as `sessionId` to the Manual Payment API. The Revenue guides document each provider's
preferred signal.

## Verify the install [#verify-the-install]

1. Open your website in a normal browser tab.
2. Visit a page that includes the tracker.
3. Return to Talivia and open the website dashboard.
4. Look for a new session, page view, referrer, browser, and country.
5. After payment setup, make a test payment and confirm revenue appears in the same website.
