viakite
Dashboard

Guides/Get started/Concepts

Concepts

Organizations, projects, keys, regions, test and live

Viakite is built around a few things you meet on every screen: organizations, projects, keys and regions. This page explains each one, how they fit together, and which key to use where.

Organizations and projects

An organization is your company or team. It holds the plan and the bill, the members and their roles, the API keys, the webhooks and the audit log. One account can be a member of many organizations and switch between them at the top of the dashboard.

A project is one website or app inside an organization. Its data, goals, funnels, alerts and public pages belong to it. Each project has its own time zone (days, charts and the daily visitor count follow it) and its own currency (the Revenue page shows money in it).

What it holdsIts id
OrganizationPlan, billing, members, roles, groups, keys, webhooks, audit logorg_…
ProjectData, goals, funnels, segments, alerts, public pages, tracking settingsprj_…

On the Free plan an organization has 1 project. Pro and Business have as many as you need. A member's access can cover the whole organization or only chosen projects; see Members and roles.

Public and secret keys

Every key starts with its kind and its mode, then the region, then 32 random letters and digits.

KeyUse it forWhere it may live
pk_live_us_…Sending data from your website or appIn the page. It can only send data to one project
pk_test_us_…The same, as test dataIn the page of a staging or local site
sk_live_us_…The API: reading reports, managing goals, settings and moreYour servers only. Never in a browser or an app
sk_test_us_…The API, in test modeYour servers only

A public key (pk_) belongs to one project and can only send events. It is safe to put in your HTML: the worst anyone can do with it is send events to your project, and allowed hostnames stop events from other sites.

A secret key (sk_) reads and changes data through the API. It has scopes, chosen from the same list of permissions as members (analytics.view, analytics.manage, analytics.export, projects.settings …), and can be limited to chosen projects. A secret key is shown once, when you create it, and stored hashed. Send it as a bearer token:

terminal
1curl https://us.api.vk.viabio.me/v1/projects/prj_…/goals \
2 -H "Authorization: Bearer sk_live_us_…"

Create, rotate and revoke keys in Settings → API keys (more in API keys). Rotating gives you a new key and keeps the old one working for 24 hours; revoking stops a key at once. The list shows who created each key and when it was last used.

A secret key with the analytics.send scope also sends events from your server, such as a payment webhook. See Server-side events.

Regions

The part after pk_live_ or sk_live_ is the region: where your data is stored and processed. The SDK reads it from the key and sends events straight to that region, so no event passes through another one.

RegionCodeIngestAPI
United States (N. Virginia)ushttps://us.e.vk.viabio.mehttps://us.api.vk.viabio.me

us is the only region today, and every organization is created in it. EU and India regions are planned and are not open yet.

Viakite has two kinds of hosts. api.vk.viabio.me is the control plane: organizations, members, projects and their tracking settings, keys, webhooks, alerts and public pages. us.api.vk.viabio.me serves your project's data: reports, funnels, goals, exports. The API reference names the host of every endpoint.

Test and live data

A live key (pk_live_) writes the data you see in reports. A test key (pk_test_) writes test data: events are stored with a test flag, left out of every report, and never billed. Use a test key on staging and local sites so they never mix with your real numbers.

The event debugger on the Install page shows test events next to live ones, marked test, so you can check an install with a test key (see Debugging). No report shows them.

Test data is kept for 7 days. An organization can store up to 100,000 test events a month; test events past that are dropped until the month ends.

One SDK for every product

Viakite Analytics, Monitoring, Logs and Updates share one SDK, one key and one bill. You install @viakite/sdk (or the script tag) once with your project's public key, and each product reads from the same install as it arrives. One plan covers every product, so turning on a second one costs nothing until its quota is used.

Today the SDK sends analytics: page views, custom events, revenue, engaged time and scroll depth. Monitoring, Logs and Updates are coming soon and will use the same key.

Next steps