Little Friend docs
Start here: what Little Friend measures, the browser script, server events, the agent door and the MCP server, and which guide to read first.
Little Friend shows who or what visited your site, where they came from, what they did, and what worked.
The pieces
| Piece | What it does |
|---|---|
| Browser script, lf.js | Page views, clicks, forms and your custom events |
| Session replay, lf-replay.js | Optional recordings of journey sessions, with text masked until you choose to show it |
| Dashboard | Overview, Acquisition, Pages, Journeys, Goals, Agents and Settings |
| Server events | Outcomes your server confirms, like a payment |
| Log drains and edge events | Crawler and AI agent requests, from Vercel, your CDN or your server |
| The door | Rules in your Worker, proxy or server that decide which agents get in, how often, and which must sign |
| MCP server | Your numbers for Claude and other AI assistants, read-only |
Three ways data arrives
- From the browser. The script tag or
@littlefriend/trackersends page views and events you name. It's where most sites start, and for many it's enough. - From your server. Confirmed outcomes, like a payment, sent with a secret server key from
@littlefriend/nodeor any language. Server-confirmed goals count these. - From your host or edge. Requests from a Vercel log drain, or from your CDN, edge functions or server middleware with
@littlefriend/edge. It's the only way to see crawlers and AI agents that never run JavaScript.
Guides
- Install the scriptOne script tag or one npm package, the settings they read, what they send, and how to add them to phone and hybrid apps.
- Set up from the command lineCreate projects, keys, goals, funnels, replay settings and log drains from a terminal, check that events arrive, and hand setup to a coding agent.
- Custom events and data-lfName the actions that matter, like a signup or a plan choice, with data-lf attributes or one function call. Props that look like personal data are dropped.
- Privacy modesAggregate by default, journeys when you turn them on. What each one can and cannot answer.
- Session replayWatch journey sessions as they happened, with every word masked until you choose to show it and form values never recorded.
- Goals and server eventsCount outcomes your server confirms, like purchases and signups, with @littlefriend/node or one HTTPS call, kept apart from clicks in the browser.
- iOS and macOS SDKAdd Little Friend to a native iOS or macOS app with Swift Package Manager: screens, events, deep links, consent and the App Store privacy label.
- Agents, log drains and edge eventsSee crawlers and AI agents with evidence, from a Vercel log drain, your edge or your server. Then choose which ones get in.
- Connect Claude and other AI assistantsLet Claude, Cursor or any MCP client read your analytics: the URL, the steps and configs to copy, and what to ask.
- How we countEvery metric with its definition and denominator, plus the rules that sort visits into channels.
- Data we never collectForm values, keystrokes, cookies, fingerprints and precise location: the data Little Friend never collects, and how the script and collector enforce it.