In-app analytics and privacy levels
Four privacy levels, from counts only to named people in your own signed-in app, and identify on the web, iOS and Android: what each level stores.
Little Friend is two products on one platform. Marketing analytics counts public sites without knowing who anyone is. In-app analytics is for your own signed-in app: it names the person and the account behind each session, so you can see who hit an error and watch what happened. One setting per project, the privacy level, says how far it goes.
The four levels
| Level | What it stores | Meant for |
|---|---|---|
| 1 Anonymous | Counts by day, page, source, country and device class. No session key, no identity. | Any public site. The default. |
| 2 Journeys | Everything in 1, plus a random session id per browser tab, timelines, funnels, paths and masked recordings. No identity. | Marketing sites that want sales journeys, usually behind consent. |
| 3 Identified | Everything in 2, plus the person id and account id your app passes to identify, on each session. Names and emails are dropped on arrival. | Signed-in apps that keep names out of third parties. |
| 4 In-app | Everything in 3, plus the person name and email and the account name. Recordings can show text, and the full-capture controls apply. | Signed-in apps used by your own customers or staff. |
New projects start at level 1. Owners and editors change the level in Settings, Privacy. Levels 3 and 4 ask for a confirmation and are audited. Lowering a level deletes what the new level does not keep, at once: below 4 every name and email, below 3 every person, account and id.
At every level
- Global Privacy Control is honored. A browser that sends it is only counted, and no level changes that.
- Passwords, payment fields, one-time codes and secrets are never recorded, even with every full-capture control on.
- Raw IP addresses and full user agents are never stored.
- Identity is only what your app declares with identify. Little Friend never guesses who someone is from their device or network.
Name the signed-in person
Call identify after sign-in, and again when the person switches account. Pass null on sign-out: later events carry no identity, and a session keeps the person it already had.
// After sign-in, and again when the person switches account
lf('identify', {
id: 'u_123', // required: your own opaque id, never an email or a bare number
name: 'Jane Doe', // kept at level 4 only
email: 'jane@acme.com', // kept at level 4 only
account: { id: 'ws_9', name: 'Acme' }, // name kept at level 4 only
});
// On sign-out
lf('identify', null);import { identify } from '@littlefriend/tracker';
identify({ id: 'u_123', name: 'Jane Doe', email: 'jane@acme.com', account: { id: 'ws_9', name: 'Acme' } });
identify(null); // on sign-outLittleFriend.identify(.init(
id: "u_123",
name: "Jane Doe",
email: "jane@acme.com",
account: .init(id: "ws_9", name: "Acme")
))
LittleFriend.identify(nil) // on sign-outLittleFriend.identify(
Person(
id = "u_123",
name = "Jane Doe",
email = "jane@acme.com",
account = Account(id = "ws_9", name = "Acme"),
),
)
LittleFriend.identify(null) // on sign-outSend every field you have. The script does not know the project's level, so the collector keeps only what the level allows and drops the rest on arrival: a level 3 project that receives an email stores none of it. Identity rides with journey sessions only, so it is never sent in aggregate mode, before consent or under Global Privacy Control. The browser keeps it in memory only, never in storage, so call identify on each page load once you know who is signed in. The native SDKs do the same in memory, so call it at each launch.
What each field needs
| Field | Rule | Kept at |
|---|---|---|
id | 1 to 64 letters, digits, dots, colons, dashes and underscores. Never an email, phone or card number. Without a valid id nothing else is kept. | Levels 3 and 4 |
account.id | The same rule as id. | Levels 3 and 4 |
name | Up to 120 characters. Not an email, phone or card number. | Level 4 |
email | Up to 254 characters, one @ and a dotted domain. Stored lowercased. | Level 4 |
account.name | Up to 120 characters. Not an email, phone or card number. | Level 4 |
Use an opaque id, like u_123, not an email. Add a prefix to numeric ids. The older form lf('identify', 'u_123') still works and sets the id alone.
What you see
- Sessions show the person and account on each row, with filters for one person or one account.
- People lists everyone your app named, with sessions, last seen, errors and recordings.
- A person page shows their history across sessions.
- Accounts lists every account with its people, activity and errors.
- At level 3 these show ids. At level 4 they show names and emails.
What your privacy page says
Levels 3 and 4 each add a sentence to the privacy text Settings gives you. Publish it before you turn the level on.
- Level 3:
When you sign in, we link your visits to the account number our app gives you, so we can see how our app is used. We do not share your name or email address with our analytics provider.
- Level 4:
When you sign in, we link your visits to your name, email address and organization, so we can fix problems and support you.
Erase a person or an account
A workspace owner can erase one person from their page: their name and email go with every session, event and recording tied to them. Erasing an account erases every person whose latest account it is. Both work at any level.