Embeddable widgets
Show a site’s public stats anywhere: a badge in your README, a mini dashboard on a page, or a counter that refreshes itself. Three formats, zero server-side setup.
The easiest path: copy the ready-made snippets from your site’s Widgets page (the absolute URL is generated for you). In the manual examples below, https://takt.example.com stands in for Takt’s address — just replace example.com with your domain.
SVG badge
A small “visitors · 30d” image, perfect for a GitHub README, an email, or a footer. No dependency, no JavaScript.
In Markdown:
[](https://takt.example.com/?ref=example.com) In HTML:
<a href="https://takt.example.com/?ref=example.com">
<img src="https://takt.example.com/public/example.com/badge.svg" alt="Takt stats" />
</a> Options
Add them as query parameters on the badge.svg URL:
| Parameter | Values | Default | Effect |
|---|---|---|---|
variant | a, b, d | a | Style: a light card, b coral, d dark |
glyph | unplug, dash, off, eyeoff | unplug | Fallback badge glyph (private/not-found site) |
lang | fr, en | fr | Label language and number format |
https://takt.example.com/public/example.com/badge.svg?variant=d&lang=en Embed (iframe)
A read-only mini dashboard: a visitors chart + 3 key figures (visitors, page views, average duration). Great for a “transparency” page or a landing site.
<iframe
src="https://takt.example.com/embed/example.com"
style="border:0;width:404px;height:264px"
title="Takt stats"
loading="lazy"
></iframe> The embed accepts the same lang parameter (and theme=light|dark) in the query: …/embed/example.com?lang=en&theme=dark.
badge.js snippet
A single <script> that automatically injects the badge or the iframe where you place it — handy when you can’t hand-write Markdown or an iframe.
<script
src="https://takt.example.com/badge.js"
data-domain="example.com"
data-format="badge"
></script> Attributes
| Attribute | Values | Default | Role |
|---|---|---|---|
data-domain | your domain | (required) | Site to display |
data-format | badge, embed | badge | Image badge or iframe |
data-variant | a, b, d | a | Badge style |
data-lang | fr, en | auto | Language |
data-theme | light, dark, auto | light | Embed theme |
data-live | (present) | — | Auto-refreshes the badge |
With data-live, the badge updates on its own (every 30s, paused when the tab is hidden):
<script
src="https://takt.example.com/badge.js"
data-domain="example.com"
data-format="badge"
data-live
></script> When the site isn’t public
If a site is private (or doesn’t exist), the widgets never show a broken image: they display a neutral takt badge with an unavailability icon and no figure at all. No stats leak, and the state is identical whether a site is private or nonexistent (anti-enumeration).
The glyph is configurable via glyph:
What’s next
- See the widgets demo — badges and embeds on a real site, no account needed.
- Events & payload — the aggregates that widgets display.