Visitor statistics (analytics) — see who visits your site, with nothing leaving your server
What it is
If your NanumOS server serves a website (the web service), Analytics can count its visitors for you: how many people came, which pages they read, where they came from, which country, which kind of device. It comes with every server edition but is off until you switch it on. The numbers stay on your server and are shown on a dashboard page that runs there.
Basics
Think of the guest book at the door of a shop. Every visitor leaves a line, but the book writes no names, only "a visitor from Korea, on a phone, read the price page, stayed 40 seconds". The book stays inside the shop; nobody outside can read it, and you can close it at any time. Analytics reads the lines the web service already writes about each request and turns them into charts, so nothing needs to be added to your pages for the first numbers to appear.
How to use it
Turn it on and off
service analytics onstarts it now and at every boot.service analytics offstops it and keeps it from starting at boot. The data already collected stays until its time is up.
Look at the numbers
- New requests appear within a few seconds. The pages are: Home (active users, sessions, views, the last 28 days, top sources, pages and countries), Realtime (the last 30 minutes), Acquisition (where people came from), Engagement (pages and events), Tech (device, system, browser, screen size, language), Countries. A date range and "compare with the previous period" sit at the top right.
- Views and users are counted only from the page tag on your pages (
hit.js, below), the way Google Analytics (GA4) counts only the page_view its tag sends. A page without the tag shows 0.
What it counts, and what it never does
- It counts: the page, the time, the country (from the web service's log), the kind of browser and device, the website that sent the visitor, and with the beacon the screen size class, the language and the seconds the page was visible.
- It never stores: the visitor's address (IP), a name, an email, a cookie, anything typed into a page. Robots, search crawlers and the server's own health checks are not counted.
- "Visitor" is a one-day code made from the country and the browser with a secret that changes every day and is thrown away after 2 days, so nobody can follow a person from one day to the next. A person who comes on two days counts twice, and the dashboard says so.
- A browser that sends "Do Not Track" or the Global Privacy Control signal is not counted by the beacon.
Check it
Zeus's check (/doctor) has an "Analytics" row: off (healthy, not switched on), running (healthy), or stopped/failing (caution, with what to type).
How it works
What the numbers mean (the GA4 definitions)
| GA4 term | Here |
|---|---|
| Views (page_view) | One per page load, sent by that page's tag (hit.js). Web-log lines, pictures, scripts, /api, and other names (the dashboard's stats.…) never count. |
| Users | One browser. GA4 recognises it by a cookie number; here no number is kept: "country + browser + the day's secret" recognises it for one day. Within a day the same as GA4; over several days a person counts once a day. |
| Sessions | End after 30 minutes without activity, and start again at midnight (Korea time). |
| Engaged sessions | Longer than 10 seconds, or 2+ page views, or a key event. |
| Realtime | The last 30 minutes, minute by minute. "Active users right now" = browsers that sent the tag in that time. |
| Internal traffic | A browser that opened https://your-site/?nanum_internal=1 once (your own device) is hidden; Admin can show it. |
| Bots | Known robots, crawlers and automation tools are not counted. |
Technical details
- Page beacon:
hit.js(about 1.4 KB) asks the site's own/hit/a?...(an empty file the web server logs); no request goes to any other address. On the first visit it keeps one yes/no flag ("been here before") in the browser's local storage, no id (it holds the day number of the first visit and each visit sends only "days since", for return rates); the beacon also counts outbound-link host names, downloaded file names, that a site search happened (never the words), the language chosen and utm_campaign / utm_medium; Do Not Track, Global Privacy Control and automated browsers stop it before it reads or writes anything. - Service state:
/tmp/.services(analytics running|stopped|backoff|failed), switchservice analytics on|off(src/supervise.c).
What this app takes and sends
| Takes | Nothing from outside. It reads this server's own web log and, if you added the beacon, the same site's own /hit/a requests. |
Frequently asked
Do I have to change my pages?
Yes, one line: add <script src="/hit.js" defer></script> to each page. Views are counted from this tag only (the GA4 rule); the web log only confirms that a browser was there.
Why is "users" higher than the number of real people?
The visitor code changes every day on purpose, so a person who comes on three days counts three times. Within one day the same browser counts once.
Can my visitors see or switch off the counting?
The counting of the log is the same record every web server keeps. The page beacon follows each browser's "Do Not Track" and Global Privacy Control setting.
Nothing shows on the dashboard
NanumOS 0.1.15511 · 2026-11-25