Appearance
AGENTS.md snippet
The setup prompt gets tracking in once. To keep every later change consistent, add the rules to the file your agents read on every task: AGENTS.md (Codex, Cursor, Copilot, Jules and others) or CLAUDE.md (Claude Code).
Copy this section into it, and adjust the first three lines to your app:
md
## Analytics and logs: simpledatalogs
- We send events and log lines to simpledatalogs. Docs: https://simpledatalogs.com/docs (agents: https://simpledatalogs.com/docs/llms-full.txt).
- Client: <the SDK or module we use, e.g. `simpledatalogs` (JS), `SimpleDataLogs` (Swift), `simpledatalogs/laravel`>, set up in <file>.
- The ingest key comes from <SIMPLEDATALOGS_KEY / build config>. Never hard-code it. `sdl_pub_` keys may ship in apps and web pages; `sdl_sec_` keys stay on servers.
### Naming events
- Event names are `snake_case`, past tense, object then action: `screenshot_taken`, `order_paid`, `export_failed`.
- Reuse an existing event name before adding a new one; search the code for the tracking call first.
- Props are flat strings, numbers and booleans, at most a handful per event: `{ "plan": "pro", "duration_ms": 412 }`.
- Low-cardinality values only in string props (a plan, a format, a platform); never ids, URLs with ids, or free text.
### Privacy
- Never send emails, names, phone numbers, IP addresses, tokens, passwords or free-text user input, in props or messages.
- Identify devices with a random install id (`device_id`), never with an email or account name.
### Sending
- Use the client above; don't call the HTTP API directly from feature code.
- If you must write a sender: POST to https://edge.simpledatalogs.com/v1/ingest with `Authorization: Bearer <key>`; set `event_id` (UUID) and `ts` when the event happens; batch (≤ 50 events, ≤ 256 KB); keep a durable outbox and delete only after `202`; retry with backoff and jitter honoring `Retry-After`; on `401` pause and keep data; on `413` split; never block or crash the app.
### Logs
- Use log levels `debug`, `info`, `notice`, `warning`, `error`, `critical`.
- Log messages should read as sentences without personal data: "Payment failed for order 7", not "Payment failed for jane@example.com".Why put it in the repo?
Agents follow repository instructions on every task, not just the first. With this section in place, "add an event when the export finishes" produces a well-named event with clean props, in the client you already use.
Next steps
- Prompt recipes: ready-made prompts for common stacks.
- Privacy for senders: the reasoning behind the privacy rules.