Skip to content

Widgets

Show your numbers on your own site.

Put a live visitor count in your header, a visit counter in your footer, or your revenue on a public page. Paste one line where it should appear, and it stays up to date by itself.

Widgets are on every plan, Free too: one site, 3,000 events a month, no card needed.

Sample numbers
An example product page with three traffic.cx widgets: a live visitor count in the header, a row of totals on the page, and a visit counter in the footer.

One line, wherever your site lets you paste

Make a widget in the dashboard and copy its code. The Embed dialog has the exact steps for WordPress, Webflow, Framer, Shopify, Wix, Squarespace, Ghost, Notion, React and GitHub.

A script tag

For any site that lets you paste HTML: plain pages, WordPress, Webflow, Framer, Shopify, Ghost, Wix, Squarespace, React and Next.js. The widget appears where the tag is.

<script async src="https://traffic.cx/widget.js" data-widget="wgt_…"></script>

Live counts update about every 15 seconds while the widget is on screen.

An iframe

For builders that only accept iframes, such as Notion. The widget draws in a sealed frame that can’t read or change the page around it.

<iframe src="https://traffic.cx/embed/#wgt_…" width="100%" height="80"
  style="border:0" loading="lazy" title="Live visitor statistics"></iframe>

Updates live, like the script.

An image

For GitHub READMEs, docs, Markdown and forums, where scripts can’t run. An SVG with the numbers drawn in.

![Visitors](https://api.traffic.cx/w/wgt_….svg)

Shows recent numbers: GitHub and others refresh images every few minutes.

Start from a template

Pick one of 11 designs, from a one-line live pill to a full stats panel for a public “open” page. Change its colours, size, corners, font, theme and every word, with a preview on light and dark pages at phone, tablet and desktop widths. Browse the widgets.

Or write your own

Write HTML and CSS with placeholders such as {{visitors}} and {{live}}, and traffic.cx fills in the numbers. Scripts are never run, and what you write is cleaned before it’s shown. Save a design once and use it on every site in your team. How placeholders work.

Show what you earn, if you want to

The revenue badge shows the revenue traffic.cx recorded for the period, from your Stripe, Dodo Payments, Lemon Squeezy or Polar payments, after refunds. It’s off until you switch it on for that one widget, and the builder reminds you that anyone who sees the widget sees the number.

Change it without touching your site

Edit a widget in the dashboard and every page that shows it updates within about a minute. Pause it and it disappears; delete it and it leaves an empty space, never an error on your page.

What a widget shares

  • Totals only: counts, a daily chart and top-five lists. Never anything about one visitor.
  • Nothing is public until you make a widget and pick its numbers. Revenue needs its own switch.
  • The activity ticker names countries only, never cities, and stays empty below 3 people on the site.
  • The widget sets no cookies, stores nothing in the browser and sends nothing about the person viewing it.

More detail in the widget guide.

Free and paid

Widgets on the Free plan and on paid plans
FeatureFreePaid
Every template, restyling and the visual builderYesYes
Script, iframe and image embedsYesYes
Widgets per site320
PeriodsToday, last 7 days, last 30 days, this monthAlso this year and all time
Revenue badgeYesYes
The small traffic.cx linkAlways shownCan be removed
Your own HTML and CSSNoYes
Saved templates for every site in the teamNoUp to 20

If a paid team moves to Free, its widgets stay up: the link comes back and custom designs fall back to their nearest template. See pricing.

Frequently asked questions

Will a widget slow my site down?

No. The script loads with async, so the page never waits for it, and it's under 10 KB compressed. If anything fails, the space stays empty instead of showing an error.

Do I need a cookie banner for a widget?

Not for the widget. It sets no cookies, uses no browser storage and sends nothing about your visitors: their browser only asks traffic.cx for the numbers you chose to show. See what a widget shares.

Can I change a widget after it’s on my site?

Yes. Edit it in the dashboard and every page that shows it updates within about a minute, without touching your site’s code. Pausing or deleting it leaves an empty space, never an error.

Can I stop other sites from showing my widget?

You can list the domains a widget may appear on, and the script and iframe refuse to draw anywhere else. The numbers are still public by your choice, so treat this as a courtesy lock, not a secret.

Can I remove the traffic.cx link?

On paid plans, yes: switch it off in the builder. On the Free plan the small link stays on every widget. It’s marked nofollow, so it never passes search ranking from your site.

Put your first widget up

Sign up, add the tracker to your site, then open Widgets in your site’s menu and pick a template.