Skip to content

Embeddable widgets

Put a live visitor count, a traffic number or recent activity on your own site, using the script you already installed.

A widget shows one of your own numbers on your own website: people on the site right now, visitors today, paying customers this month, or a quiet toast of recent visitor locations. It is social proof taken from real data rather than invented.

Building one

Go to Widgets and start from a preset — Live pill, Visitors today, Quiet outline, Customer proof and a few more — then adjust. A site can have up to 20 widgets.

SettingOptions
LayoutBadge, card or toast
MetricPeople on the site now, visitors, page views, paying customers, goal completions, or recent visitor locations
PeriodToday, last 24 hours, last 7 days, last 30 days
ThemeDark, light or auto
StyleSolid, glass or outline, with pill, rounded or square corners and three sizes
PositionInline, or floating in any of the four corners

You write the text yourself, with {count} where the number goes: {count} watching now, {count} visitors today. A live dot and a sparkline are optional, and you can set a minimum count so a widget stays hidden until the number is worth showing.

Tip. Recent visitor locations is a toast, and goal completions needs a goal chosen. The editor tells you when a combination will not work, and previews everything as you change it.

Putting it on your site

Press Embed code and paste the snippet where the widget belongs:

html
<script defer src="https://statsy.co/js/widget.js" data-widget="XXXXXXXXXX"></script>

For several widgets on a page, or a strict content security policy, load the script once and mark each spot with a placeholder instead:

html
<div data-statsy-widget="XXXXXXXXXX"></div>

What a widget gives away

A widget is public: anyone who can read your page can read its number. Think about that before embedding paying customers on a marketing site. The locations toast shows places, never people.

Deleting a widget removes it from every page it is embedded on, immediately and everywhere, so check before you confirm. For a whole dashboard rather than a single number, see Sharing.

Last updated · Markdown version