Open-source projects
A public stats page and live numbers on your site
Your project has a website or docs, and you want to show your traffic in the open: a public page anyone can read, on your own domain, and live numbers such as "1,840 visitors this month" on the site itself. Viakite counts visitors without cookies, so you don't need a cookie banner on a project site.
Who it's for
Maintainers of open-source projects, and anyone running an "open startup" page with their numbers in public.
What you get
| Feature | What it does | Guide |
|---|---|---|
| A public page | A read-only dashboard on its own subdomain, https://<name>.p.vk.viabio.me, with no account needed to read it | Public pages |
| A custom domain | The same page on stats.yourproject.org, free on every plan | Custom domain |
| Display components | <VisitorCount />, <LiveVisitors />, <Chart />, <TopPages /> and more for React, Vue and Svelte | Stats on your site |
| No cookies | Nothing stored on your readers' devices | Privacy |
Set it up
Add the script to your site
Copy the snippet from Analytics → Install. On a static site or docs generator, it goes in the
<head>of every page:index.html1<script defer src="https://us.api.vk.viabio.me/v1/a.js" data-project="pk_live_us_…"></script>Make the public page
Open Analytics → Sharing, click New share and leave Kind on Public page. Give it a title such as "Acme stats", pick a subdomain, and tick the reports to show: Overview, Sources, Pages and Locations work well for a project. Leave Access empty so anyone with the link can open it, and switch on Let search engines index it if you want it found. Click Create page and copy the link, such as
https://acme-stats.p.vk.viabio.me.Put it on your own domain
From the page's row menu, choose Custom domain, type
stats.yourproject.organd click Add domain. At your DNS provider, add a CNAME record from that name tocname.p.vk.viabio.me, with any proxy (Cloudflare's orange cloud) off. Viakite checks every 10 minutes, or click Check DNS. The certificate is made on the first visit.Show live numbers on your site
In Analytics → Sharing, click New share, set Kind to Share token, tick Overview, Pages and Realtime, and copy the
st_…value (it is shown once). A share token is read-only and safe in browser code. Then, in React:src/Stats.tsx1import { Chart, LiveVisitors, TopPages, ViakiteProvider, VisitorCount } from "@viakite/sdk/react";23export function Stats() {4return (5<ViakiteProvider share={import.meta.env.VITE_VIAKITE_SHARE} dateRange={{ preset: "30d" }}>6<p>7<VisitorCount /> visitors this month, <LiveVisitors /> reading now8</p>9<Chart metric="visitors" />10<TopPages limit={5} />11</ViakiteProvider>12);13}Vue and Svelte take the same components from
@viakite/sdk/vueand@viakite/sdk/svelte. They need@viakite/sdk0.6.0 or later.
What to watch
- Pages on your plan. Free has 1 public page, Pro 3 and Business 10; a share token is never counted as a page. Paid plans can add pages at $5 / ₹299 a month each, by the day.
- Viewers. Every different person who opens the page, or whose browser runs the components, is one monthly viewer: 1K a month on Free, 10K on Pro. Set Viewer limit a month on the share and choose Keep showing or Pause. See Viewers and billing.
- How far back. Viewers can change the date range only within the days your plan keeps: 30 days on Free, a year on Pro.
- The badge. Public pages show a small "Powered by Viakite" at the foot. The Remove Viakite branding add-on (Pro and Business) takes it off every page.
- Numbers may be a minute old. Answers are reused for 60 seconds.
- No password for components. A public page with a password can't feed the components; use a share token.
Not here yet
There is no stats badge image for a README yet, and no goal count component.