# Widgets > Embed live, aggregated Supametrics numbers on your own site with the public widgets from the Widgets tab of Site settings. Source: https://supametrics.io/docs/widgets Widgets are small, public boxes of numbers you can embed on your own website, for example "12 people on this site now" or an all-time pageview counter. Set them up under **Site settings › Widgets** at `/settings/widgets`. Widgets show aggregated numbers only. They never show visitor IDs, names, emails, individual pages or individual payments. ## Turn on public widgets Widgets are off by default. While they are off, every widget address shows "This widget isn't available." Turn on the **Public widgets** switch to publish them. Only the website's owner can turn this switch on or off, because widgets make the website's numbers (revenue included, in the Preview widget) public. Members and viewers see the switch greyed out with a note saying so. Turning the switch off takes every widget for this website offline. Widgets already embedded on other sites then show the "isn't available" message. ## Choose a widget Once public widgets are on, pick one under **Widget**: | Widget | What it shows | Embed height | | --- | --- | --- | | **Realtime** | How many people are on your site right now (visitors active in the last 5 minutes). | 180 px | | **Preview** | Your domain, a bar chart of visitors per hour for the last 24 hours, and the total visitors and revenue for the last 24 hours. | 180 px (minimum) | | **Chart** | A bar chart of visitors per minute for the last 30 minutes, with the total. | 400 px (minimum) | | **Counter** | A single all-time number: total pageviews. | 180 px | The **Preview** widget shows revenue only once Stripe is connected or a payment has been recorded. Revenue is in the website's currency and counted the same way as on your dashboard (see [Revenue and attribution](https://supametrics.io/docs/revenue)). ## Style the widget - **Text size**: from 10 to 28 px. The default is 16. Values outside the range are brought back into it. - **Theme**: **System** (follows the light or dark setting of the person viewing it), **Light** or **Dark**. - **Colours**: the swatches show the colours used: **Primary** for text, **Visitors** for visitor bars, and, for the Preview widget, **Revenue**. The revenue colour follows [General › Colour scheme](https://supametrics.io/docs/settings-general#colour-scheme). The preview on the right is the real widget, with your live numbers. ## Embed code Choose **HTML** or **JSX** above the code box and copy the code. It is an `iframe` pointing at your widget, with your chosen size and theme in the address. For example, an HTML Realtime widget: ```html ``` `YOUR_SITE_ID` is your website's public site ID (shown under **Site settings › General › Domain**). Use the JSX version in React projects. You can change the height in the `style` if your layout needs more room. The widget's address has this form: ```text https://app.supametrics.io/widgets//?textSize=<10-28>&theme= ``` ## How fresh the numbers are - The widget page reloads itself every 60 seconds. - Numbers are cached for up to 30 seconds, so several embeds on a busy page don't each trigger a new count. The widget does not run any script on your page and loads nothing from other sites. It has a small "Supametrics" link in the corner. ## The same numbers as JSON If you would rather draw the numbers yourself, each widget is also available as JSON, from any website (CORS is open for GET requests): ```text https://app.supametrics.io/api/widgets// ``` The answer includes `type`, `domain` and `value` (visitors right now for Realtime, visitors in the last 24 hours for Preview, visitors in the last 30 minutes for Chart, all-time pageviews for Counter). Preview adds `revenue` (in the currency's smallest unit, or `null` without revenue tracking), `currency` and `series` (24 hourly visitor counts, oldest first). Chart adds `series` (30 per-minute visitor counts, oldest first). Like the widget pages, it answers "not found" while public widgets are off. For full access to your data, use the [REST API](https://supametrics.io/docs/rest-api) instead. ## Common questions ### Do widget views count as visits? No. Widgets are served by Supametrics and do not run the tracking script. ### Can I show a widget without making my whole dashboard public? Yes. Widgets and the [public dashboard](https://supametrics.io/docs/sharing) are separate switches. --- This is one page of the Supametrics help center (section: Site settings). - Index of every page: https://supametrics.io/llms.txt - Every page in one file: https://supametrics.io/llms-full.txt