Tracking settings
Hostnames, parameters, Do Not Track and more
Tracking settings decide which events your project accepts and how they are cleaned: the hostnames allowed to send, IP addresses and paths to leave out, extra URL parameters to keep, and Do Not Track. They apply on the server to every event as it arrives, whatever way you installed Viakite.
In the dashboard
Open Analytics → Analytics settings → Tracking. It needs the projects.settings permission; without it the page says so.
- Where data comes from: allowed hostnames.
- What is left out: excluded IP ranges, excluded paths, personal-data patterns, and the Do Not Track switch.
- Page addresses: extra URL parameters to keep, with the ones always kept listed under them.
- Visits: the session timeout, from 5 to 240 minutes.
Type a value and press Enter (or paste a list) to add it; × removes it. A value that will be refused shows with a red border. Save sends everything at once; Discard goes back to what is saved.
Under the form, Rejected hostnames lists the hostnames that sent events and were turned away, with how many and when last; Allow adds one to the allowed hostnames. Your own visits opens your site with a link that leaves the browser you are using out, or counts it again (see Exclude your own visits).
You can also read and change every setting through the API with a secret key, as below.
What works today
| Setting | Field | Applied today |
|---|---|---|
| Allowed hostnames | allowed_hostnames | Yes |
| Extra URL parameters | url_parameters | Partly: read, but not stored in any report yet |
| Excluded IP ranges | excluded_ip_ranges | Yes |
| Excluded paths | excluded_paths | Yes |
| Respect Do Not Track and Global Privacy Control | respect_do_not_track | Yes, on the server |
| Session timeout | session_timeout_minutes | Yes, in every report |
| Personal-data patterns | pii_patterns | Yes |
| Exclude my visits | none | Through localStorage in your browser; the Tracking tab gives the line to run, see Debugging |
Changes reach the servers that receive events within a minute. They apply to new events only; stored data doesn't change. The session timeout is the exception: visits are worked out when a report runs, so a new timeout changes past visits too.
Read and change them
The settings live on the control plane, https://api.vk.viabio.me. Both calls need the projects.settings permission.
1curl -X PATCH https://api.vk.viabio.me/v1/projects/prj_…/settings \2-H "Authorization: Bearer sk_live_us_…" \3-H "Content-Type: application/json" \4-d '{5"allowed_hostnames": ["acme.com", "*.acme.com"],6"excluded_paths": ["/admin/*"],7"respect_do_not_track": true8}'
1{2"project_id": "prj_…",3"allowed_hostnames": ["acme.com", "*.acme.com"],4"url_parameters": [],5"default_url_parameters": ["utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content", "ref", "gclid", "fbclid", "msclkid", "li_fat_id", "q", "query", "search", "s"],6"excluded_ip_ranges": [],7"excluded_paths": ["/admin/*"],8"pii_patterns": [],9"respect_do_not_track": true,10"session_timeout_minutes": 30,11"updated_at": "2026-11-21T10:30:00Z"12}
Fields you leave out stay as they are. A list replaces the whole list, so send every item you want to keep; send [] to clear it. A field that breaks a rule answers 422 with validation_error, and details names the field and the rule.
Allowed hostnames
With an empty list, events from any hostname are accepted. With a list, only those hostnames are, and the rest are dropped without being stored or billed. This stops someone else's site from sending events with your public key.
acme.comallows exactly that hostname.*.acme.comallowsacme.comand every subdomain:www.acme.com,app.acme.com,shop.eu.acme.com.- Up to 100 hostnames, in lower case.
Add localhost if you track on your machine with data-localhost. To see which hostnames sent events and were turned away, with a count and when they were first and last seen:
URL parameters
Page URLs keep only a short list of query parameters, default_url_parameters in the answer above: the five UTM fields, ref, the paid click ids and the site-search parameters. Every other parameter is removed, because parameters often carry personal data.
To keep more, add them to url_parameters: up to 50 names of letters, digits and _ . - [ ], up to 64 characters each.
1{ "url_parameters": ["plan", "coupon"] }
On the page, data-params="plan,coupon" (or the params option) keeps them in the URL the browser sends. The server checks its own list again: the default parameters plus url_parameters.
Extra parameters don't show in reports yet
The server reads the extra parameters you allow, but stores only the default ones today: the UTM fields and ref as campaign dimensions, the click ids as the paid-click platform, and the search parameters as the site-search term. Pages are stored by path, without the query, so an extra parameter such as plan can't be seen or filtered on yet.
Excluded IP ranges and paths
excluded_ip_ranges drops events from up to 100 IP addresses or CIDR blocks, such as your office (203.0.113.0/24) or one address (198.51.100.7). The address is the visitor's, read from the request, or from the first address in X-Forwarded-For behind a proxy.
excluded_paths drops page views and events on up to 100 paths. Each starts with /, up to 255 characters; a trailing * matches the rest of the path:
1{2"excluded_ip_ranges": ["203.0.113.0/24"],3"excluded_paths": ["/admin/*", "/preview"]4}
Excluded events are never stored or billed.
Do Not Track
With respect_do_not_track on, events from browsers that send Do Not Track (DNT: 1) or Global Privacy Control (Sec-GPC: 1) are dropped as they arrive, never stored and never billed. It is off by default, since Viakite keeps no personal data. The browser still sends the request; the server drops it.
Session timeout
session_timeout_minutes is how long a visit lasts without an event: 5 to 240 minutes, 30 by default. Visits, bounce rate, visit duration, entry and exit pages, a visit's source, funnels and alerts all use it. Visits are worked out when a report runs, so changing it changes past visits too.
Personal-data patterns
pii_patterns takes up to 20 regular expressions of your own, in RE2 syntax, up to 255 characters each. Whatever one matches is replaced with [redacted] in paths, referrers, titles, UTM values, search terms, and event and user property values, before anything is stored. They run before the built-in rules, which still replace e-mail addresses, phone numbers and long tokens. A pattern that doesn't compile, or that matches empty text (such as x*), answers 422. See Privacy.
1{ "pii_patterns": ["order-\\d+", "(?i)acct_[a-z0-9]+"] }
With these, /orders/order-12345/receipt is stored as /orders/[redacted]/receipt.