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.

!
The script does not send events when running on local and automated environments such as 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>
name
required
A non-empty string.
Limits:
  • Event names have max. length of 80 characters.
  • pageview and engagement are reserved event names.
props
optional
A flat object with string, number or boolean values related to the event.
Limits:
  • Max. 30 key/value pairs per event.
  • Names have max. length of 80 characters.
  • Values have a max. length of 512 characters.
  • Null, object or array values are not allowed.
callback
optional
Fires after event was sent. {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 Windows users from Germany).

Edit a filter chip to change its match type.

MatchBehavior
iscase-sensitiveMatches an exact value.
is notcase-sensitiveExcludes an exact value.
containscase-insensitiveMatches text anywhere in a page path.
doesn't containcase-insensitiveExcludes paths containing the text.

Filtering custom events

Your custom events may contain additional properties. You can filter by these additional properties.

MatchBehavior
iscase-sensitiveMatches an exact value.
Missing properties don’t match.
is notcase-sensitiveExcludes an exact value.
Missing properties don’t match.
existscase-sensitiveMatches properties that exist, even if empty.
does not existcase-sensitiveMatches events without this property.
>, ≥, <, ≤, betweenFor 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.

PrivateAccess only for logged in site owners.
PublicAccess 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 curl and 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 /16 for IPv4 or /48 for 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.pushState and 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.
  • replaceState is 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.

Purge data
Deletes all existing events data for the site but keeps the site and event collecting script running. The dashboard goes empty and will refill as new visits arrive. Can not be undone.
Delete site
Removes the site and all event data permanently. Events still sent to the script will be ignored. Can not be undone.