Add this tag to every page, before </head>, with your project's ingest key:
<script defer src="https://platform.logzuno.app/sdk/logzuno.js"
data-api-key="YOUR_INGEST_KEY"></script>That's all for web analytics. The script records a pageview when the page loads and on every navigation in a single-page app (it watches history.pushState, replaceState and the back button), with the referrer, UTM tags, screen size and language.
How it tells people from bots
The script reports the first real interaction on each page: a tap, click, key press, scroll or wheel event that the browser marks as trusted. A visitor who interacts counts as a person; one who never does is unconfirmed. Browsers driven by automation (navigator.webdriver) never count as people, even with input. See web analytics for how the counts are reported.
Options
| Attribute | What it does |
|---|---|
data-api-key | Your ingest key. Required |
data-project-id | Your project's slug. Optional: the key already names its project |
data-user-id | The signed-in user's ID, so pageviews link to their profile |
data-auto-track | "false" stops automatic pageviews; call LogZuno.pageview() yourself |
data-exclude-search | "true" drops the query string from recorded URLs |
data-domains | Comma-separated hostnames to record on; other hosts (staging, localhost) are ignored |
data-endpoint | Another API address, for example a proxy on your own domain |
Track clicks without code
Add data-pt-event to a link, button or form and LogZuno records an event when it is clicked or submitted:
<button data-pt-event="Pricing CTA clicked"
data-pt-event-channel="marketing"
data-pt-event-tags-plan="growth">
Start free trial
</button>Optional attributes: data-pt-event-channel, -description, -icon, -notify ("true"), and any number of data-pt-event-tags-{key}. Form fields named like passwords are never sent.
Track from JavaScript
The script exposes window.LogZuno:
LogZuno.track("Report exported", { channel: "product", properties: { format: "csv" } });
LogZuno.identify("user-123", { plan: "growth" });
LogZuno.group("acme", { name: "Acme Corp", userId: "user-123" });Events from the browser are queued and sent in batches, and anything unsent goes out when the tab is hidden or closed.
Leave your own visits out
List your office or VPN addresses under Project settings → General → Your team's networks, and they are kept out of people and AI figures. On a single browser, run this once in the console to stop that browser being tracked:
localStorage.setItem("pt.disabled", "1");