---
title: "Count visits without tracking people · Agent Wranglers"
url: https://agentwranglers.se/playbook/website/privacy/analytics-privacy
updated: 2026-10-20
licence: "All rights reserved"
---

# Count visits without tracking people

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Recommended
- Chapter: [Privacy](https://agentwranglers.se/playbook/website/privacy)
- Rule: Measure without tracking people. Use no analytics, or analytics without cookies or personal data.
- How: Use no analytics, or a self-hosted tool that sets no cookies and stores no personal data. Say which in the privacy policy. See also [keep a tracking plan in the code](https://agentwranglers.se/playbook/data/product-analytics/tracking-plan).
- Check: With a fresh browser profile, a visit sets no cookies or storage for analytics. The stored analytics rows contain no IP address, user agent or ID.

Example:

```js
// Sends only the path. The server must store no IP address or ID with it.
navigator.sendBeacon('/stats', JSON.stringify({ path: location.pathname }));
```

```python
# Flask: count paths only, with no IP address, cookie or user agent
from collections import Counter
counts = Counter()

@app.post("/stats")
def stats():
    path = str((request.get_json(force=True, silent=True) or {}).get("path", ""))[:200]
    counts[path] += 1
    return "", 204
```

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers website playbook: https://agentwranglers.se/playbook/website/privacy/analytics-privacy`.

- Previous: [Ask before embedded content uses cookies](https://agentwranglers.se/playbook/website/privacy/storage-access-api)
- Next: [Keep only what you need and delete it on time](https://agentwranglers.se/playbook/website/privacy/data-minimization)
- [Privacy](https://agentwranglers.se/playbook/website/privacy)
