1 Choosing a design
Nothing matches all the filters at once. One of them has to go.
Custom design
Shape and colours are free; the preview updates instantly.
Classics since 2006 (0)
1 Options optional
The counter works with the default settings. These options adjust its appearance, access or additional measurements; none is required to get started.
Adding the codeWhich settings are useful?
- Choosing a design
- Colours, size and display options change how the counter looks. The default design works too.
- Keep a way back to the counter
- Save an accessible email address with the button, then confirm it using the email link. This provides a way back to the counter. Without it, keep the private management link; website verification is another recovery route.
- Start count
- For a fresh start, leave this empty or use 0. When switching from another counter, enter its total as the starting value. This carries over a number, not old daily reports.
- Custom name for the address (optional):
- A short name such as myshop makes the statistics address easier to remember. Use 2–20 characters: a-z, 0-9, - or _. A name made only of digits or already taken is unavailable. Leaving this empty keeps the numbered address.
- Private statistics (no link to public panel)
- Keeps the statistics from being publicly readable. Save the private management link: it opens both reports and settings. To share reports without settings access, create a separate reading link in the counter tools.
- Optionally protect the statistics with a password:
- A viewing password lets other readers open the statistics after entering it. Save it with the button beside the field. It is separate from the owner key in the private management link.
- Also count link clicks
- Adds automatic events for supported link clicks. No value needs to be entered here. Leave this off if page-view counting is enough; clicks alone do not prove a successful enquiry or purchase.
- Count transitions between pages
- Counts transitions between pairs of pages. This is on by default and can be switched off. The result shows common transitions, not a recording of an individual visit.
- Also measure screen and browser-window size
- Adds screen size, browser-window size and pixel ratio to the script’s measurements. This is off by default. Use it only when needed and after checking the website’s requirements.
- Join the ring
- The webring links participating websites. Joining is optional: enter the page containing the counter and a short title, then complete the installation check. The counter works without membership.
- Address or range not to count
- Exclusion settings keep own visits out of future measurements. Choose a suitable method in the exclusion section. They do not make the statistics private or remove earlier visits.
Where available, automatic refresh updates the displayed counter image without reloading the page. These refreshes do not add visits and do not make visitor measurement more accurate.
Starting value and short name save when their fields lose focus. Other settings show a Save button or a status message. After changing the design or code options, copy the updated code and replace the old code on the website.
The live version is a small script instead of an image. It asks every 30 seconds who is there right now and counts exactly once – when the map loads.
Transparent fits light and dark pages alike. Everything sits in the image address, there is nothing to save.
The 2006 bitmap variant - 50 fonts, 15 templates. Keeps existing counters editable.
Shows one flag per country and how many visitors came from there. How many countries fit follows from layout and size.
Multiple selection with Ctrl or ⌘. Hidden countries are still counted, they just do not appear in the image.
Shows next to the number how the last seven days went. Measured, that costs 120 bytes over the wire – on the pill the line sits behind the number, on the plain counter beneath it. A counter without history shows no line and stays the same size.
The counter carries both versions and shows the one matching the visitor's setting – the device's setting, not this page's. Measured, that costs about a quarter more, not twice as much: gzip sees the same drawing twice. The figures are on "What the counter weighs".
Starting value and short name save when their fields lose focus. Other settings show a Save button or a status message. After changing the design or code options, copy the updated code and replace the old code on the website.
Keep a way back to the counter
An email address can help recover access later. Send the confirmation email and open its link to finish saving the address. Alternatively, keep the private management link in a safe place.
The saved address is used to send the access link again on request. It is not used for advertising or newsletters and can be removed here.
Google reCAPTCHA checks this submission against abuse; data is sent to Google. The script loads only when this form is opened.
Supported links within the website and to other websites are counted as events. Names come from the target address, not the link text. Up to 70 automatic event names are available. A click does not confirm a successful form submission or purchase.
Shows how often one page follows another within half an hour. This is on by default and can be switched off. The report shows a pair only after at least 5 transitions; it does not show complete individual journeys.
Adds data-screen="1" to the script code. The browser then reports screen size, window size and pixel ratio. Leave this off unless those details are needed, and check the requirements for their use on the website.
Access and other settings
Keeps the statistics from being publicly readable. Save the private management link: it opens both reports and settings. To share reports without settings access, create a separate reading link in the counter tools.
Page views count recorded loads. The visitor figure adds daily visitor counts together: a return on another day counts again. It does not identify distinct people across the whole period, and older counters may have a shorter visitor history.
For a fresh start, leave this empty or use 0. When switching from another counter, enter its total as the starting value. This carries over a number, not old daily reports.
2 to 20 characters, letters, digits, "-" and "_" only. /live/<number> keeps working alongside it. Empty field = no alias.
The address of the site and a short name. The counter has to be on the page – that is checked at sign-up. With this ticked, the code also contains the four ring links. Install it first, then sign up here.
Signed up. A person will look at it, then the entry appears in the ring.
The ring is a list among equals, the home page is a shop window – so we ask separately. Without the tick the entry stays only in the ring.
The ring is a list among equals, the home page is a shop window – so we ask separately. Without the tick the entry stays only in the ring.
At least 6 characters. Save the password with the button beside the field. Saving an empty field removes it. Keep a copy: the viewing password cannot be recovered, but authorised owner access can change it.
A single address or a whole range (83.10.1.0/24). A range is usually the better choice: most connections get a new address every day, but the network around it stays the same. What goes in here is stored in the clear and can be removed at any time. This request is coming from right now.
What appears above and below the globe on your page. Pick form and look up here – the globe on your page then shows them like that, without the switches. “None” leaves only the globe and the link below it.
Vector counters only: they stay sharp at any size. The value sits in the image address, there is nothing to save.
2 Adding the code
This code keeps counter 6607146216 and its existing statistics. A new design does not need a new counter number. For a separate website, a separate counter keeps the reports apart.
Already have a Stats4U counter? Keep its number
A new look does not need a new number. With the old one, the new code keeps counting in the same statistics, including the total so far.
The start value, name, password and other settings of this counter stay as they are. They can be changed with the management link. Lost the management link?
Markdown, BBCode and HTML <img> embed the plain image. It counts just the same and does report which page it was on – the server reads that from the referrer. The only thing left open is where the visitor came to the site from: that is known to the browser alone, and only the HTML version with the script can ask.
Without a script the counter does not know which page it is on, so the page list stays empty. With the address here, the page gets a line; a leading slash is enough, the counter takes the rest from the origin. Better left empty if the same code sits on many pages, in a forum signature for instance – a fixed entry would be wrong for every other page.
Management link – save it now
Only this link opens the settings of this counter later: goals, time zone, excluding your own visits and more. There is no account – if the link is lost and no email address is on file, there is no way back in. Best bookmark it right away.
Where does it go?
chomikuj.pl
The counter goes into the chomik description ("opis"). Descriptions do not accept scripts, so the "HTML <img>" tab replaces the first line, and the page address goes into the field below, so the statistics know where the counting happens.
WordPress
Appearance → Widgets, or anywhere in the block editor: a „Custom HTML" block takes the code. It has to be the „Custom HTML" block, not „Paragraph" – a paragraph shows the code as text instead of running it.
Download the plugin (zip) – shortcode [stats4u] or automatically in the footer
WordPress.com
Careful, this is not the same as a self-hosted WordPress: on the free plan WordPress.com strips script, iframe and embed out of the „Custom HTML" block. The counter then simply does not appear, with no error. Scripts need a paid plan with hosting features switched on. The Markdown tab is the one to use here – the plain image gets through on any plan.
Blogger
Layout → Add a Gadget → HTML/JavaScript. The code goes in there and gets saved – done.
Ghost
Settings → Code injection → Site footer. If the counter should sit somewhere specific rather than at the very bottom, it belongs in the theme instead.
Wix
Add → Embed → Embed HTML → Enter code, paste, update. Two things to know: Wix puts the code into a sandboxed frame, so the counter sees the address of that frame and not of the page it sits on – the page list stays empty here. And the address has to be https, Wix will not accept http.
Squarespace
Edit page → Add block → Code. JavaScript and iframes need the Core plan or higher there; on Personal and Basic the block stays empty. HTML and Markdown work on every plan though – the block switches to Markdown, and the Markdown tab supplies the code.
Neocities
index.html opens in the editor and the code goes in before </body>. That is all there is to it – custom HTML is allowed there without restrictions.
Hugo, Jekyll, Astro
Into the template, not into the post: layouts/partials/footer.html (Hugo), _includes/footer.html (Jekyll) or src/components/Footer.astro (Astro). If the counter should appear in one single post only, the Markdown tab does it, written straight into the text.
Count clicks and downloads too
An event is something someone does – a click on "Contact", a submitted form, a download. The attribute goes on the element, or the function gets called:
<a href="/contact" data-s4u-event="contact">…</a>
<script>s4u.event('form-sent');</script>At most 100 different names per counter and 300 events per hour and address. The name is lowercased, spaces become hyphens. Names that look like personal data, such as an @, a long run of digits or a long code, are rejected. The automatic click counting may use at most 70 of the names; the rest is kept for names that are set by hand.
Moving from another counter
What comes along: nothing. The old total cannot be carried over – no counter service hands its numbers to another, and a number we simply set would be made up. The new counter starts at zero. Anyone wanting to keep the old total can leave the old image beside it as a quiet memento, or write the old number into the text.
Checking that it works
Address of the page the counter should be on. It is fetched once, and whatever turns up is reported here.
Is something missing from Stats4U? One sentence is enough: Write to us