Site analytics
Attach a website to a Trakys project and the project's Analytics tab shows its traffic — one script tag on your side, no accounts on a third-party dashboard, no cookies on your visitors.
Setting it up
- In Trakys, open Projects → Sites → + Connect, pick the project and enter the site's domain. Trakys registers the site with its analytics backend and hands you a script tag.
- Paste that tag into your site's
<head>. It looks like this (your ids differ):<script defer src="https://analytics.example/script.js" data-website-id="00000000-0000-0000-0000-000000000000"></script> - That's all. Visits start counting immediately; the numbers appear on the site's card and in its Analytics tab.
What you see in Trakys
| Block | Contents |
|---|---|
| Totals | Visitors, views, visits — each with a delta against the previous window — plus bounce rate and average visit length |
| New users | Count of the signup event for the window, with a delta — sent by your backend through the events API below (or by the page script) |
| Chart | Daily pageviews for the selected window (7, 30 or 90 days) |
| Breakdowns | Top pages, referrers, countries, browsers, devices — and every custom event you send |
Everyone who can see the project sees its analytics; attaching or detaching the site needs editor-level access.
Events API — count signups and anything else, from your backend
The script counts what happens in the browser. For things only your server knows — a user registered, an order was paid, an export ran — your backend sends an event with one HTTP call. No SDK; any language that can make a POST works.
- In the site's Connection tab, press Create ingest key. The key (
tik_…) is shown once — store it as a server secret. It is write-only: it can record events for this one site and can do nothing else (no reads, no account access), which is what makes it safe to keep on a production box. - Send events from your backend when the thing actually happens:
POST https://api.trakys.com/v1/ingest/event Authorization: Bearer tik_your_key_here Content-Type: application/json {"name": "signup", "url": "/register"} // url is optionalcurl -X POST https://api.trakys.com/v1/ingest/event \ -H "Authorization: Bearer tik_your_key_here" \ -H "Content-Type: application/json" \ -d '{"name": "signup"}' - One name is special:
signupbecomes the New users tile on the Analytics tab (send it once per completed registration). Every other name — 1–50 chars of letters, digits, spaces,_ - .— shows up in the Events breakdown with its count. The key identifies the site, the name identifies the event: one key covers all your events, and a new event needs no setup anywhere — send a new name and it appears.
| Response | Meaning |
|---|---|
202 | Accepted. Ingest is fire-and-forget: a hiccup in the analytics store is logged on our side and never fails or retries your request — don't build a retry loop around it. |
400 | Event name doesn't match the allowed shape |
401 | Missing, malformed, rotated or revoked key |
429 | Rate limited — 240 events/min per IP, 2000/hour per site; Retry-After says when to resume |
Rotate or revoke the key any time on the Connection tab (rotation invalidates the old key immediately). Trakys stores only a hash of the key, so it can never be shown again — losing it just means minting a new one. Events can also be sent from the page itself with the script's own umami.track("signup") — but the backend is the honest source for registrations: it fires exactly once, after the registration really completed, and bots can't inflate it.
Privacy properties
The script is a ~2 KB cookieless counter (self-hosted Umami). It stores nothing on the visitor's device — no cookies, no localStorage, no fingerprint identifiers — so under EU ePrivacy rules it does not require a consent banner. The cost of that honesty: a returning visitor counts as a new one, and there are no cross-site profiles. You get aggregate traffic, not people.
Limits
One website per project (sub-projects share it). There is no public API for pulling the metrics out of Trakys yet — the numbers live in the Analytics tab. If you need raw exports today, say so: [email protected].