# Embeddable widgets

Embed a live visitors pill, a revenue card, a visitors chart or a README badge on any page, with options for the period, theme and colors. Totals only.

Show your numbers on other pages: a live "12 online now" pill on your landing page, a revenue card on your open startup page, a visitors chart in a blog post, or a badge in your README. Widgets show totals only, never who your visitors are.

**1. Turn widgets on**

In Settings → Widgets. This creates the website's secret widget link.

**2. Pick a widget and style it**

**Realtime** (visitors online), **Preview** (your website with its visitors and revenue) or **Chart**. Set the text size, colors and theme, and preview it live.

**3. Copy the code**

As HTML or JSX, and paste it where you want the widget.

```
<iframe src="https://supranalytics.app/embed/YOUR_WIDGET_KEY/visitors?period=live" width="170" height="40" style="border:0" title="Visitors online"></iframe>
```

## Widgets and options

URL: `/embed/<key>/<widget>?options`

| Widget | Shows |
| --- | --- |
| `visitors` | Visitors over the period, or the people online now with period=live. |
| `revenue` | Revenue over the period. |
| `chart` | A visitors chart (optionally with revenue bars and top countries). |
| `site` | Your website's name and icon with its visitors and revenue. |

| Option | Values |
| --- | --- |
| `period` | live, 30m, 24h, 7d, 30d (default), 12m |
| `theme` | auto (default), light, dark |
| `color, color2` | Hex colors without #, like color=22c55e |
| `size` | Text size in pixels, 10 to 40 (default 15) |
| `revenue` | 1: revenue bars on the chart |
| `countries` | 1 or 0: the top five countries on the chart (on by default for live and 30m) |
| `bg` | transparent: no background |
| `format` | json: the numbers as JSON; svg: an image badge (visitors with period=live) |

## README badge

```
![Visitors online](https://supranalytics.app/embed/YOUR_WIDGET_KEY/visitors?period=live&format=svg)
```

## Turning widgets off

Turning widgets off stops every embed; turning them on again brings back the same link. **Make a new link** replaces it for good, and every widget you embedded stops until you paste the new code. Numbers are at most a minute old (20 seconds for the live and 30-minute widgets, which also update themselves).

---

This page on the web: https://supranalytics.app/docs/embeddable-widgets
Every documentation page: https://supranalytics.app/docs.md
