Back to onboarding

Install guide

Install on Vercel

Add SourceTrace to any Vercel-hosted site by injecting the tracker via your framework's <head>.

Snippet

<!-- Add inside <head> in your root layout or _document.tsx -->
<script src="https://api.sourcetrace.xyz/t.js?key=YOUR_API_KEY" async></script>

Replace YOUR_API_KEY with the key from Settings → Sites.

Steps

  1. 1.Copy your site's API key from Settings → Sites.
  2. 2.Paste the snippet into your framework's root <head> (e.g. app/layout.tsx).
  3. 3.Deploy. The tracker fires on the first page view.

Screenshots

Vercel project dashboard with the deploy build log.

Browser devtools network panel showing /api/events POST.