On Wed, May 20, 2026 at 11:45 PM Suyash Dwivedi via Wikitech-l
<[email protected]> wrote:
>
> Hi everyone,
>
> I've always been curious about how many people actually visit my Toolforge 
> tools - and I suspect I'm not alone. So I built Toolcounter 
> (https://toolcounter.toolforge.org/), a lightweight, privacy-friendly hit 
> counter designed specifically for Toolforge-hosted tools.
>
> What it tracks
>
> 📄 Page views - counted on every page load (including refreshes). Good for 
> total traffic.
> 👤 Sessions (unique visit approximation) — uses sessionStorage in the 
> visitor's browser. First open in a tab = 1 session. Refresh = not counted 
> again. New tab = counted again. No cookies, no IP, no personal data stored.
>
> Both counts appear separately on the dashboard with a per-day bar chart.
>
> Quick integration (replace YOUR_TOOL and PAGE)
>
> Option 1 - SVG badge (no JS, image only, shows page views):
> <img 
> src="https://toolcounter.toolforge.org/badge.php?tool=YOUR_TOOL&page=PAGE"; 
> alt="Page views">
>
> Option 2 - JS embed (shows both views + unique sessions):
> 👁 Views: <span id="tc-views"></span>
> 👤 Unique: <span id="tc-sessions"></span>
> <script 
> src="https://toolcounter.toolforge.org/embed.js.php?tool=YOUR_TOOL&page=PAGE";></script>
>
> An embed code generator is available on the homepage.
>
> Privacy
> The database stores zero personal data, only anonymous counters per (tool, 
> page) pair. No cookies are set. No IP addresses, User-Agent strings, or 
> usernames are ever written to the database. Full privacy policy: 
> https://toolcounter.toolforge.org/privacy.php
>
> Source code is publicly available and open for audit.

Seeing many flowers bloom is great. There is also a system you can use
at https://toolviews.toolforge.org/api/ which attempts to count 2xx
status responses ("hits") for all tools by parsing the access logs
generated at the Toolforge reverse proxy service. That system does not
currently have a nice UI, but it does have data going back to at least
2019 and does not require inserting tracking tokens in your pages.

Bryan
-- 
Bryan Davis                                        Wikimedia Foundation
Principal Software Engineer                               Boise, ID USA
[[m:User:BDavis (WMF)]]                                      irc: bd808
_______________________________________________
Wikitech-l mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

Reply via email to