Trace
Embeds & sharing

Widget embeds

Show live visitor stats on your own site with an embeddable card, inline pill or image badge.

What you can embed

  • Card — visitors online now, visitors over a time window, an optional trend line and your top 5 countries.
  • Inline pill — a compact "12 online now" counter that sits in a header or footer.
  • Badge — a static image of today's visitors, for places that don't allow iframes, such as READMEs.

The card and pill are iframes. They load no tracking script, set no cookies and make no requests to other services, so they don't add visits to your own stats.

Turn it on

  1. Open Settings → Widget embeds and turn on Public widget embeds. Embeds are off for every site until you do this.
  2. Pick the options. Choose card or pill, the theme, accent colour and, for the card, the time window, trend line, countries and width. The preview shows the real widget with your live numbers.
  3. Copy the snippet onto your page. Paste the <iframe> wherever the widget should appear. It works in plain HTML, any framework and most site builders that accept custom HTML.

Your snippets

With the default options, once embeds are on:

Card

<iframe
  src="https://data.whos1.bid/widget/YOUR_WEBSITE_ID?variant=card&theme=light&accent=007a55&window=24h&chart=1&countries=1&width=320"
  width="320" height="400"
  style="border: 0; max-width: 100%; color-scheme: normal;"
  loading="lazy"
  title="Live visitors"
></iframe>

Inline pill

<iframe
  src="https://data.whos1.bid/widget/YOUR_WEBSITE_ID?variant=pill&theme=light&accent=007a55"
  width="188" height="36"
  style="border: 0; max-width: 100%; color-scheme: normal;"
  loading="lazy"
  title="Live visitors"
></iframe>

Badge

<img src="https://data.whos1.bid/api/widget/YOUR_WEBSITE_ID" alt="Visitors today" />

URL parameters

Every option is a parameter on the widget URL, so you can also edit the snippet by hand. A missing or invalid value falls back to its default rather than breaking the widget.

ParameterValuesDefaultWhat it does
variantcard, pillcardWhich widget to show.
themelight, darklightColours for light or dark pages.
accentHex colour without #, 3 or 6 digits007a55The live dot, trend line and country bars.
window30m, 24h, 7d24hCard only. The period for the visitor total, trend line and countries.
chart1 or 01Card only. Show the trend line.
countries1 or 01Card only. Show the top 5 countries.
width240–640320Card only. The card's maximum width in pixels. Give the iframe the same width.

Sizes

An iframe can't resize itself to its content, so the snippet sets a fixed height for the options you picked. If you change chart or countries by hand, update the height too:

LayoutWidth × height
Card, numbers onlywidth × 150px
Card with trend linewidth × 226px
Card with countrieswidth × 324px
Card with bothwidth × 400px
Inline pill188 × 36px

Keep max-width: 100% in the style and the card shrinks to fit narrow columns and phones.

What becomes public

While embeds are on, anyone can see these numbers for the site:

  • Visitors online now (active in the last 45 seconds, the same figure as the dashboard's online counter).
  • Distinct visitors in the last 30 minutes, 24 hours or 7 days.
  • Visitors per minute, hour or 6 hours across that window (the trend line).
  • The 5 countries with the most visitors in that window, with their counts.

Nothing else is shared. Pages, referrers, sources, devices, events, revenue and individual visitors stay private. Bots are never counted.

Anyone can read them, not just your snippet

The site ID in the widget URL is the same public ID that's in your tracking script. With embeds on, anyone who knows it can load the widget or its stats. Leave embeds off if these numbers shouldn't be public.

Build your own

The widget reads a public JSON endpoint you can also call yourself. It allows requests from any origin.

GET https://data.whos1.bid/api/widget/YOUR_WEBSITE_ID/stats?window=24h&chart=1&countries=1
{
  "window": "24h",
  "live": 12,
  "visitors": 1342,
  "series": [{ "start": "2026-09-29T13:00:00.000Z", "visitors": 48 }],
  "countries": [{ "code": "GB", "name": "United Kingdom", "visitors": 310 }],
  "updatedAt": "2026-09-30T12:59:41.000Z"
}
ParameterWhat it does
window30m, 24h (default) or 7d. Anything else returns 400.
chart=1Include series: 30, 24 or 28 buckets, oldest first, zero-filled.
countries=1Include countries, the top 5 by visitors.

It returns 403 when embeds are off and 404 for an unknown site.

Caching and refresh

  • Stats are computed at most once a minute per site and option set, then served from cache.
  • The widget refreshes itself every minute while it's on screen, and pauses in background tabs.
  • Responses carry Cache-Control for the time left on the cached copy, so browsers and CDNs never keep numbers longer than the server does.

Turning it off

Switch off Public widget embeds in Settings → Widget embeds. Embedded widgets go blank and the stats endpoint returns 403. Pages that are already open blank at their next refresh, and copies cached by a browser or CDN expire within a minute. Remove the iframe from your site as well, so visitors don't see an empty space.

FAQ

Why doesn't the visitor total match my dashboard?

The widget counts everyone who did anything in a rolling window, including people who arrived earlier and are still browsing. The dashboard's Visitors counts visits that started in the selected period. Use the Last 24 hours range on the dashboard to compare. The numbers should be close, not identical.

There's a white or black box behind the rounded corners

Keep color-scheme: normal in the iframe's style. Without it, pages that declare a dark colour scheme make the browser paint a solid background behind the frame.

Flags show as two letters

Flags come from the visitor's emoji font, which keeps the widget free of image requests. Windows has no flag emoji, so it shows the country code (GB, US) instead.

The widget is blank

Embeds are off for the site, or the site ID in the URL is wrong. Check the switch in Settings → Widget embeds and copy the snippet again.

Can I change more than the colours?

Beyond the options above, no: the widget's layout is fixed so it looks right in any page. For a fully custom design, build it on the stats endpoint.

On this page