Set up kindstats in 2 minutes
Documentation
This page covers script installation, sending custom events, site settings and understanding your analytics data.
Getting started
Install the script#
Add a site in your dashboard and you'll get a site-specific snippet with a unique script ID. Paste it inside the <head> section of every page you want to measure.
<script>window.kindstats=window.kindstats||{event:function(){(this.q=this.q||[]).push(arguments)}}</script>
<script async src="https://kindcdn.com/js/ks-XXXXXXXXXXXX.js"></script>
Once the script is installed, your visit should show up within a few seconds.
localhost, 127.0.0.1, 0.0.0.0, [::1], file:// or headless browsers. Deploy on a real domain to see events.Events
Custom events#
Pageviews are collected automatically. For all other events you may want to capture — a signup, a checkout, anything else — simply call the kindstats.event() function:
<script type="text/javascript">
kindstats.event("signup", {
plan: "pro",
seats: 5,
trial: true
})
</script>
- Event names have max. length of
80characters. pageviewandengagementare reserved event names.
- Max.
30key/value pairs per event. - Names have max. length of
80characters. - Values have a max. length of
512characters. - Null, object or array values are not allowed.
{status} for an HTTP response, including HTTP errors; {error} for serialization or transport failures.Your dashboard
Ranges & filters#
The dashboard offers various filters to understand your analytics data. Applied filters live in the URL, so you can easily bookmark it or share the URL with colleagues.
Default filters
- Timeframe: Live (a rolling 5-minute window), Today, Last 24 hours, Last 7 days, Last 28 days, or a custom range.
- Filters: click any value — a source, country, page, browser, OS, or device — to filter the entire dashboard by it. Combine filters to drill down further (e.g. show only
Windowsusers fromGermany).
Edit a filter chip to change its match type.
| Match | Behavior |
|---|---|
| iscase-sensitive | Matches an exact value. |
| is notcase-sensitive | Excludes an exact value. |
| containscase-insensitive | Matches text anywhere in a page path. |
| doesn't containcase-insensitive | Excludes paths containing the text. |
Filtering custom events
Your custom events may contain additional properties. You can filter by these additional properties.
| Match | Behavior |
|---|---|
| iscase-sensitive | Matches an exact value. Missing properties don’t match. |
| is notcase-sensitive | Excludes an exact value. Missing properties don’t match. |
| existscase-sensitive | Matches properties that exist, even if empty. |
| does not existcase-sensitive | Matches events without this property. |
| >, ≥, <, ≤, between | For filtering numeric values. Non-numeric, missing or unsupported values are excluded. |
Site settings
Public & private#
Dashboards are private by default; you change access under Site settings → Visibility.
| Private | Access only for logged in site owners. |
|---|---|
| Public | Access to anyone that has the URL. Live view and CSV export are still only available for logged in accounts. |
Weekly email reports#
Each site gets a report from 06:00 every Monday in its timezone, covering the previous Monday–Sunday. Turn reports on or off under Site settings → Reports, or use the unsubscribe link in the email.
Timezone#
Each site has a timezone set under Site settings → Timezone. It controls the dashboard's date ranges and weekly email reports. For example, "Today" means today in the set timezone. You can safely change it at any time.
Excluding traffic
Bots and crawlers#
We automatically filter out bot and crawler traffic for you. This includes:
- Most datacenter IPs
- Headless browsers
- Requests from
curland other HTTP clients - Requests from development environments (
localhost,127.0.0.1, etc.)
These requests are ignored and do not count towards your pageview budget.
Your own visits#
You can block specific IPs to ignore visits from your own machine, your office IP or a noisy scraper. Open Site settings → Blocked IPs and add the address. Requests from these IPs are ignored, so they do not count against your pageview budget.
- Add a single IP (
203.0.113.7) or a CIDR range (203.0.113.0/24). - Up to 20 rules per site.
- A single CIDR rule can't be broader than
/16for IPv4 or/48for IPv6.
Selfhosting
Script proxy#
You can serve the analytics script through your own domain by proxying to our script URL. Here is a minimal example for Nginx; just replace SITE_ID with the script ID from your installation snippet:
location = /ks.js {
proxy_pass https://kindcdn.com/js/ks-SITE_ID.js;
}
location = /e/SITE_ID {
proxy_pass https://kindcdn.com/e/SITE_ID;
proxy_set_header X-Forwarded-For $remote_addr;
}
Then, in your site's <head>, link to the new script location:
<script async src="/ks.js"></script>
Misc
How we count#
Our plans are based on pageviews. Here’s what counts towards your monthly limit:
- Your plan's pageview limit is shared across all sites in your account, not per-site.
- If you send custom events, those count as 1 pageview each.
- We filter out most bot traffic coming from datacenter IPs. Such visits do not count towards your pageview budget.
- If you embed the script on error pages (such as 404), those views are also counted.
Single-page apps#
Client-side routing is handled automatically when using modern frameworks like React, Vue or Svelte.
Under the hood, that means:
- The tracker hooks
history.pushStateand the back/forward button, so a route change that changes the path sends a new pageview. - Query-string and hash changes don't count. Applying a filter, opening a modal, or scrubbing a token from the URL is the same logical page, so no extra pageview fires and the engagement timer keeps running.
replaceStateis ignored. The HTML spec treats it as "amend the current entry, not a navigation", so the tracker respects that.
Privacy
What we collect#
kindstats is built to measure your site without tracking individual visitors. By default, kindstats does not store cookies or personal data. Also there is no cross-site or cross-device tracking. If you send custom events that contain personal data, you may need a legal basis for processing that data.
Visitor IP addresses are not stored. They're hashed with a rotating salt which is later discarded.
- Page URL path. Query parameters are stripped before storing.
- Referrer (host only, not full URL)
- Country from local GeoIP lookup (approximate)
- Device type (desktop or mobile)
- Browser and OS family
- Custom events you explicitly send
For the full picture, please review our privacy policy and data processing agreement.
EU data sovereignty#
kindstats is built and hosted entirely within the European Union. Event data is stored in the EU only. All our sub-processors that process or store event data are EU-based and ISO 27001 certified. Learn more about our EU-only approach.
Deleting data#
Both actions live under Site settings → Danger Zone.