Follow every visitor from first click to signup.

The smallest tracker that still shows each visitor's whole path. Private until they say yes. One binary on your server.

private tracker, gzipped
1,501 B
one server binary
14 MB
cookies before consent
0

Three steps from script tag to signup.

Paste one line. Watch the first visitor arrive. Name the moment that matters.

  1. Install

    One script tag, checked live.

    Paste the snippet. The Install panel turns green when the first event lands.

    Settingsexample.commysite
    Waiting for the first event…Receiving data · last event 4s ago
    Script tagnpmNext.js
    index.html
    <script defer
      src="https://stats.example.com/_t/t.js"
      data-site="mysite"
      data-api="https://stats.example.com/_t/e">
    </script>
  2. Track

    Events arrive as they happen.

    Pages, read time, outbound clicks and identify, in the order the visitor made them.

    1 onlinemysite
    1. Ggoogle.com
    2. /docs/components 1m40s
    3. github.com
    4. identified user_986
    5. Signup
    6. left
  3. Understand

    Mark what matters.

    A goal is a page or an event. Trail counts who reached it and their share of everyone.

    GoalsVisitorsRate
    • SignupGoal reached35339.5%
    • Pricing page28431.8%
    • Copy Code788.7%
    • Docs feedback313.5%
    • Add goal

One visitor. Four visits. One signup.

Every visit on one sheet: where they came from, each page in order, how long they read and when they signed up.

Visitorsuser_986identified4 visits over 3 days
Nov 2Mon
Ggoogle.com/docs/components/data-story 1m6s↓20%/docs/components 1m40s↓49%github.comidentifiedSignupleft
Nov 12Thu
Ggoogle.com/docs/installation 1m58s↓50%/docs 1m51s↓30%left
Ggoogle.com/ 1s↓39%left
Nov 19Thu
Ggoogle.com/docs/components/data-story 4s↓41%left

Recreated in HTML from the dashboard's Visitors tab.

Everything you need to read a visit. Nothing that follows people around the web.

Journeys

Every visit, one path.

Each page in order, with read time and scroll depth. identify joins the visits into one person.

Live visitors

Who is here right now.

Anyone active in the last five minutes.

3 onlinelast 5 min
  • /docs/installationjust now
  • /pricing40s ago
  • /2m ago
Goals

Count what matters.

A page or an event, with its rate against last period.

  • SignupGoal reached35339.5%
  • Pricing page28431.8%
  • Copy Code788.7%
  • Add goal
Named clicks

Name a click in HTML.

Add data-trail to any element. No JavaScript.

Works after consent or in full mode.

<button data-trail="Copy Code">
  Copy
</button>
CopyCopy Code112 clicks
Origin check

Only your sites can send.

Events from any other origin get a 403.

3 events rejected from other origins.

  • example.comallowed
  • *.vercel.appallowed
  • copycat-site.net403
Delivery health

Know your events arrive.

Failed sends retry up to five times.

Delivery health7 days
Events
12,840
On a retry
1.7%

A retry means the first send failed, often on a weak mobile connection.

Three modes. You choose what the browser keeps.

Pick a mode. On the left, what Trail writes in the visitor's browser. On the right, what you can see.

<script … no data-mode>

Nothing is stored in the browser until you call trail.consent(true). Until then, visits are counted but not joined.

In the visitor's browser
example.com/docs
Cookies
NameValueExpires
_t_id8f3c1e…a21d1 year
No cookies
Local storage
KeyValue
_t_id8f3c1e…a21d
No items
In your dashboard
VisitorsThe same person, three visits
  1. Anonymousnot followedNov 2 · 23:50/docs/components
  2. Anonymousnot followedNov 12 · 11:30/docs/installation
  3. Anonymousnot followedNov 19 · 20:21/docs/components/data-story

Three visits, three strangers. Accept analytics on the left to see what changes.

trail.consent(false) wipes the ids and stops sending.Do Not Track and GPC mean nothing is sent.Raw IPs never touch the disk.

Measured, not promised.

Sizes are gzip level 9.

private tracker, t.p.js
1,501 B
standard tracker, t.js
2,043 B
requests per pageview
2
server binary, dashboard included
14 MB
server memory in use, about
30 MB
cookies before consent
0
Every tracker file must stay at or under 2,048 B. CI fails the build otherwise.Read how we measure

Your server, one file of data.

A static Go binary with the dashboard inside. SQLite runs in the same process, so there is nothing else to install.

server: ~
$ docker run -d -p 8080:8080 -v trail-data:/data \    -e TRAIL_PASSWORD=… -e TRAIL_SITES=mysite=example.com ghcr.io/karanjot786/trail3f9c2a1e8b7d41c6a0e5d2b9$ docker logs 3f9c2026/11/20 09:14:02 trail listening on :8080 (sites: 1, api tokens: 0)$ 
localhost:8080
mysiteUp
Visitors0
Page views0

Waiting for the first event…

docker run -d --name trail -p 8080:8080 -v trail-data:/data \
  ghcr.io/karanjot786/trail
docker logs trail 2>&1 | grep 'Log in'   # generated password
binary, dashboard inside
14 MB
memory while running, about
30 MB
other services to run
0
data
NameSizeKind
trail.db48.2 MBSQLite database
trail.db-wal4.1 MBWrite-ahead log
trail.db-shm32 KBShared memory

The -wal and -shm files are SQLite's working files while Trail runs.

3 items, 52.3 MB

Your data is one file.

Every event, goal and site lives in trail.db. Back it up with .backup while Trail runs. Stop Trail and copy it to move servers.

backup
sqlite3 trail.db ".backup backup.db"

Ask your AI where signups come from.

Trail serves MCP at /mcp. Add it to Claude Code once, then ask in plain words.

terminal
claude mcp add --transport http trail \
  https://stats.example.com/mcp \
  --header "Authorization: Bearer <read-token>"
7 tools
  • list_sites
  • get_stats
  • get_series
  • get_breakdown
  • list_visitors
  • get_journey
  • goal_report

Read-only token. The tools read your stats. They cannot change goals, sites or settings.

~/mysiteSample conversation

Which pages brought signups this week?

trail · goal_report{site: "mysite", range: "7d"}

39 people signed up this week, up from 30. Here are your page goals over the same week:

PageVisitorsLast week
/docs/installation212154 +38%
/pricing96101 −5%

goal_report counts each goal on its own, so it can't tell which page came before a signup. Want me to read the signups' journeys with get_journey and check the last page before each one?

Questions

Do I need a cookie banner for Trail?

In the default mode the tracker writes nothing to the browser until you call trail.consent(true) or trail.identify(). Until then it stores no cookie and no localStorage. Whether your site needs a banner for other reasons is a question for your own legal advice.

Will ad blockers stop it?

Serve the tracker and its endpoint from your own domain with a /_t/* rewrite. The browser then sees a first-party script and a first-party request.

What do I need to run it?

One machine that can run a static Go binary, or Docker. The database is SQLite inside the same process, so there is nothing else to install or keep running.

How do I back up or move my data?

All data is one SQLite file. Snapshot it with sqlite3 .backup on a schedule, and copy the file to move to a new server.

Can one server track several sites?

Yes. List them in TRAIL_SITES as id=domain pairs, or add them in Settings, and switch between them in the dashboard.

What does it cost?

Nothing. Trail is MIT licensed and there is no hosted plan or paid tier. You pay only for the server you run it on.

Walk one real journey in the demo.

Read-only, with generated data. No sign-up.

Try the live demo
docker run -d -p 8080:8080 -v trail-data:/data trail