One snippet, any platform
The Traceten snippet is a single<script> tag that goes in your site’s <head>. It loads asynchronously, weighs under 10KB gzipped, and never blocks page rendering.
data-cookie-domain is your own domain. It keeps one visitor as one visitor when they move between your subdomains, so an AI referral that lands on example.com still gets credit for a purchase that completes on shop.example.com. It is off until you set Cookie domain, either in the Add site form (we strongly recommend it) or later under the site’s Settings → Cookies. Copy the tag from the dashboard rather than typing this value: once set, we render your registered domain onto it there, and a value the page does not belong to is ignored. See Subdomains and cross-domain.
These steps are also in the app. Every guide below is rendered inside the dashboard with your
real site key filled in. Open Sites → Install for your site, or the setup flow you land in after
signing up, and pick the same platform. The install page walks three steps: add the script, follow
your platform, and verify, which turns green on the first pageview. To have a coding assistant do
the install, click Set up with AI there. It copies a prompt with your site key that adds the
snippet to your project and suggests goals, asking you before it adds any. With a cookie domain
set, the prompt also names your visitor cookie and has the assistant check every tag for
data-cookie-domain, telling you where it is missing.Pick your platform
Plain HTML
Any static site or HTML template. Paste before
</head>.WordPress
Two methods: theme editor or the Insert Headers and Footers plugin.
Webflow
Add to Project Settings under Custom Code.
Shopify
Edit
theme.liquid under Layout in your live theme.Next.js
Add to the App Router layout, or
_document.tsx on the Pages Router.Prefer to send events from your backend?
To send events from your server instead of (or alongside) the browser, use a server SDK. Server delivery reaches the traffic the snippet cannot: ad-blocked visitors, privacy browsers, server-rendered flows, and background jobs. The server SDKs live in their own section. See the SDKs overview to pick a language (Node.js, Python, or Go), and the Browser SDK reference for thewindow.traceten client-side API.
After installing
- Verify the snippet is firing. Check the dashboard within 30 seconds of a pageview.
- If something doesn’t work, see troubleshooting.
- Once verified, explore your dashboard. AI source data starts appearing within hours of real traffic.

