Share your stats
Show live visitor numbers on your own pages, add a visitor badge, or publish a read-only public analytics dashboard.
Show off your traffic: put live numbers like "12 people online now" on your own pages, add a visitor badge to a README, or publish a read-only dashboard that anyone with the link can open. You decide exactly which numbers are public; individual visitors, journeys and revenue never are.
Both live in Analytics settings → Sharing, and each has its own switch.
Stats on your site
- Turn on Stats on your site.
- Under What may be published, tick the numbers you're happy to make public: People online now, Visitors today, Visitors this week, Visitors this month, Pageviews this month and Countries. Only ticked numbers are ever served.
- Under Paste into your page, pick a snippet, click the copy icon and paste it where you want the number to appear.
The tracking script that's already on your site fills the snippets in, so there's no extra script to add.
| Snippet | What it shows | Needs |
|---|---|---|
| Live counter | "12 people online now" | People online now |
| Social proof | "1.2k people from 24 countries visited this week" | Visitors this week (and Countries for the country part) |
| Just a number | One bare number you can style yourself | The number you choose |
| README badge | A small image badge, for a README on GitHub or anywhere images work | The number you choose |
The snippets look like this:
<div data-phq-widget="online"></div>
<div data-phq-widget="social-proof"></div>
<span data-phq-stat="visitors_30d"></span>
For Just a number, set data-phq-stat to one of online, visitors_24h, visitors_7d, visitors_30d, pageviews_30d or countries_30d. The README badge snippet already contains your site ID. Change metric= at the end of its address to show a different published number.
Developers can also read the published numbers in JavaScript with projecthq.getStats().
If a number isn't ticked, or Stats on your site is off, the snippet simply stays empty.
Public dashboard
A public dashboard is a read-only page with your aggregate traffic, at an address like https://projecthq.pro/s/your-project.
- Turn on Public dashboard. The link appears below. Use the icons next to it to copy it or open the page.
- Under What the page shows, choose the sections: Summary tiles, Traffic chart, Top pages, Traffic sources, Channels, Countries, Devices and Goals.
- Under Longest range a visitor may pick, choose 7 days, 30 days, 90 days or 12 months.
- Decide who can find it:
- Secret link: the page only opens with the token in the link. Share the link only with people who should see it.
- Allow search engines: when off, the page asks search engines not to index it.
Changes are saved as you make them, and the page follows them straight away.
To cut off everyone you've shared the link with, click New link next to Replace the link and confirm. The old link stops working immediately.
Tip: The public dashboard and the stats on your site are separate switches. You can publish a live counter on your homepage without a public dashboard, or the other way round.