Create an account
Go to app.knockstat.com/signup and give a name, an email address, a password (10 to 128 characters) and an organization name. The organization name starts as your email's domain; change it if you like.
Accounts are reviewed. After you sign up you see a “Waiting for approval” page instead of the dashboard, and we email you when the review is done. Confirm your email address when asked: it helps the review. Once approved, the dashboard opens in your new organization, and you are its owner. If an account is not approved, the page shows the reason.
Hosting the platform yourself? You create the users and sites on your own servers, so skip this page’s first two steps and start from picking an install method.
Add a site
A site is one thing you measure: a website, an app or a set of servers. Every event carries the site it came from.
- Open Settings → Sites and keys in the app (
app.knockstat.com/settings/sites) and fill in Add a site. Owners and admins can add sites; other members can read them. - Name is for you and can change. Site id is stored on every event and can never be changed or used again: lowercase letters, digits,
-and_, up to 64 characters. - Allowed origins (optional) lists the web origins your pages are served from. See allowed origins. Default host (optional) is recorded for browser events that name no host.
- Your plan may limit how many sites you can have. At the limit, Settings says so; delete a site to add another.
The new site comes with a site key and an ingest key (next sections). The ingest key is shown once, when it is made: copy it then. The app shows ready-made install snippets with your keys filled in.
The app’s set-up guide, at app.knockstat.com/setup, walks through the same steps and checks live that the first events arrive.
Pick an install method
A site can use more than one. Choose by where the data is.
| Method | Use it for | Key | Guide |
|---|---|---|---|
| Script tag | Page views, outbound clicks, engagement time and custom events from your pages. One line of HTML. | Site key | Website tag |
| npm packages | The same, bundled into a JavaScript, React or Vue app. | Site key | JavaScript, React and Vue |
| HTTP API and Node SDK | Events your backend knows about: sign-ups, purchases, jobs. Server-side page views. | Ingest key | Server and HTTP API |
| Access logs | Every request your web server already logs, including visitors who block scripts, bots and error pages. No change to your pages. | Ingest key | Logs and the agent |
Check that data arrives
- Visit your site (or run the first request through your server), then open the dashboard and pick the site. The live badge counts visitors and page views in the last five minutes.
- The set-up guide’s live check does this for you and tells you when the first event lands.
- Nothing yet? Browser beacons always get
204, even when they are rejected, so a204proves nothing. Check the site key, the site’s allowed origins, and that you are not onlocalhost(skipped by default). For servers and log shippers, read the response:401is a bad or revoked key,429a rate limit or quota, and rejected events are listed in a202.
Site key and ingest key
Every site has two kinds of key, because a key in a web page is public by nature.
| Site key | Ingest key | |
|---|---|---|
| Prefix | kst_ | ksi_ |
| Where it lives | In your page source, readable by anyone | On your servers. A secret: never ship it to a browser. |
| Can call | /v1/e only (the browser beacon) | /v1/batch and /v1/logs |
| Protection | The site’s allowed origins and a rate limit | Secret and revocable |
| Shown | Any time, in Settings | Once, when made. A lost key is replaced by a new one. |
| Used by | Script tag, npm packages | Node SDK, HTTP API, the agent, Vector, Fluent Bit |
Both keys belong to one organization and one site; you never name them in the payload. Make more keys, and revoke old ones, under Settings → Sites and keys. To rotate an ingest key, make a new one, switch your servers to it, then revoke the old one. Changes reach ingest within a minute, with no restart.
Stuck? Email [email protected].