Re: Toolcounter – a privacy-friendly hit co unter for Toolforge tools

Sohom Datta via Wikitech-l <[email protected]> Thu, 21 May 2026 12:39:50 -0400
Newsgroups gmane.science.linguistics.wikipedia.technical
Message-ID <CAFf9UfyB7=-GNwEM=XXkeAH2dX5TYi=KZ1DpArWJeKif0nGQog@mail.gmail.com>
--===============1704333319202582843==
Content-Type: multipart/alternative; boundary="000000000000cbc0b4065256911b"

--000000000000cbc0b4065256911b
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

@Bd808: Ooh, this is nice, I did not know about the existence of this
service!

I wonder if there is an easy way for the tool view to tell if a view was
from a bot?

Regards,
Sohom Datta
---
Open-source contributor @Wikimedia


On Thu, May 21, 2026 at 12:15=E2=80=AFPM Bryan Davis via Wikitech-l <
[email protected]> wrote:

> On Wed, May 20, 2026 at 11:45=E2=80=AFPM 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
> >
> > =F0=9F=93=84 Page views - counted on every page load (including refresh=
es). Good
> for total traffic.
> > =F0=9F=91=A4 Sessions (unique visit approximation) =E2=80=94 uses sessi=
onStorage in the
> visitor's browser. First open in a tab =3D 1 session. Refresh =3D not cou=
nted
> again. New tab =3D counted again. No cookies, no IP, no personal data sto=
red.
> >
> > 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=3D"
> https://toolcounter.toolforge.org/badge.php?tool=3DYOUR_TOOL&page=3DPAGE"
> alt=3D"Page views">
> >
> > Option 2 - JS embed (shows both views + unique sessions):
> > =F0=9F=91=81 Views: <span id=3D"tc-views"></span>
> > =F0=9F=91=A4 Unique: <span id=3D"tc-sessions"></span>
> > <script src=3D"
> https://toolcounter.toolforge.org/embed.js.php?tool=3DYOUR_TOOL&page=3DPA=
GE
> "></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 string=
s,
> 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.or=
g/

--000000000000cbc0b4065256911b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div class=3D"gmail_default" style=3D"font-family:ver=
dana,sans-serif">@Bd808: Ooh, this is nice, I did not know <span class=3D"A=
sgive ng" style=3D"border-style:none;background:none">about the existence o=
f this service!</span></div><div class=3D"gmail_default" style=3D"font-fami=
ly:verdana,sans-serif"><br></div><div class=3D"gmail_default" style=3D"font=
-family:verdana,sans-serif">I wonder if there is an easy way for=C2=A0the t=
ool view to tell if a view <span class=3D"Asgive ng" style=3D"border-style:=
none;background:none">was</span> from a bot?</div><br clear=3D"all"></div><=
div><div dir=3D"ltr" class=3D"gmail_signature" data-smartmail=3D"gmail_sign=
ature"><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr"><div><d=
iv dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr"><div><font face=
=3D"verdana, sans-serif" color=3D"#666666">Regards,</font></div><div><font =
face=3D"verdana, sans-serif" color=3D"#666666">Sohom Datta</font><span></sp=
an></div><div><font face=3D"verdana, sans-serif" color=3D"#666666">---</fon=
t></div><div><font face=3D"verdana, sans-serif" color=3D"#666666">Open-sour=
ce contributor @Wikimedia</font></div></div></div></div></div></div></div><=
/div></div></div></div></div></div></div><br></div><br><div class=3D"gmail_=
quote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, =
May 21, 2026 at 12:15=E2=80=AFPM Bryan Davis via Wikitech-l &lt;<a href=3D"=
mailto:[email protected]">[email protected]</a>&g=
t; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0p=
x 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed=
, May 20, 2026 at 11:45=E2=80=AFPM Suyash Dwivedi via Wikitech-l<br>
&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">wik=
[email protected]</a>&gt; wrote:<br>
&gt;<br>
&gt; Hi everyone,<br>
&gt;<br>
&gt; I&#39;ve always been curious about how many people actually visit my T=
oolforge tools - and I suspect I&#39;m not alone. So I built Toolcounter (<=
a href=3D"https://toolcounter.toolforge.org/" rel=3D"noreferrer" target=3D"=
_blank">https://toolcounter.toolforge.org/</a>), a lightweight, privacy-fri=
endly hit counter designed specifically for Toolforge-hosted tools.<br>
&gt;<br>
&gt; What it tracks<br>
&gt;<br>
&gt; =F0=9F=93=84 Page views - counted on every page load (including refres=
hes). Good for total traffic.<br>
&gt; =F0=9F=91=A4 Sessions (unique visit approximation) =E2=80=94 uses sess=
ionStorage in the visitor&#39;s browser. First open in a tab =3D 1 session.=
 Refresh =3D not counted again. New tab =3D counted again. No cookies, no I=
P, no personal data stored.<br>
&gt;<br>
&gt; Both counts appear separately on the dashboard with a per-day bar char=
t.<br>
&gt;<br>
&gt; Quick integration (replace YOUR_TOOL and PAGE)<br>
&gt;<br>
&gt; Option 1 - SVG badge (no JS, image only, shows page views):<br>
&gt; &lt;img src=3D&quot;<a href=3D"https://toolcounter.toolforge.org/badge=
.php?tool=3DYOUR_TOOL&amp;page=3DPAGE" rel=3D"noreferrer" target=3D"_blank"=
>https://toolcounter.toolforge.org/badge.php?tool=3DYOUR_TOOL&amp;page=3DPA=
GE</a>&quot; alt=3D&quot;Page views&quot;&gt;<br>
&gt;<br>
&gt; Option 2 - JS embed (shows both views + unique sessions):<br>
&gt; =F0=9F=91=81 Views: &lt;span id=3D&quot;tc-views&quot;&gt;&lt;/span&gt=
;<br>
&gt; =F0=9F=91=A4 Unique: &lt;span id=3D&quot;tc-sessions&quot;&gt;&lt;/spa=
n&gt;<br>
&gt; &lt;script src=3D&quot;<a href=3D"https://toolcounter.toolforge.org/em=
bed.js.php?tool=3DYOUR_TOOL&amp;page=3DPAGE" rel=3D"noreferrer" target=3D"_=
blank">https://toolcounter.toolforge.org/embed.js.php?tool=3DYOUR_TOOL&amp;=
page=3DPAGE</a>&quot;&gt;&lt;/script&gt;<br>
&gt;<br>
&gt; An embed code generator is available on the homepage.<br>
&gt;<br>
&gt; Privacy<br>
&gt; The database stores zero personal data, only anonymous counters per (t=
ool, page) pair. No cookies are set. No IP addresses, User-Agent strings, o=
r usernames are ever written to the database. Full privacy policy: <a href=
=3D"https://toolcounter.toolforge.org/privacy.php" rel=3D"noreferrer" targe=
t=3D"_blank">https://toolcounter.toolforge.org/privacy.php</a><br>
&gt;<br>
&gt; Source code is publicly available and open for audit.<br>
<br>
Seeing many flowers bloom is great. There is also a system you can use<br>
at <a href=3D"https://toolviews.toolforge.org/api/" rel=3D"noreferrer" targ=
et=3D"_blank">https://toolviews.toolforge.org/api/</a> which attempts to co=
unt 2xx<br>
status responses (&quot;hits&quot;) for all tools by parsing the access log=
s<br>
generated at the Toolforge reverse proxy service. That system does not<br>
currently have a nice UI, but it does have data going back to at least<br>
2019 and does not require inserting tracking tokens in your pages.<br>
<br>
Bryan<br>
-- <br>
Bryan Davis=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 Wikimedia Foundation<br>
Principal Software Engineer=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Boise, ID US=
A<br>
[[m:User:BDavis (WMF)]]=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 irc: bd808<br>
_______________________________________________<br>
Wikitech-l mailing list -- <a href=3D"mailto:[email protected]=
" target=3D"_blank">[email protected]</a><br>
To unsubscribe send an email to <a href=3D"mailto:[email protected]=
kimedia.org" target=3D"_blank">[email protected]</a><br>
<a href=3D"https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wik=
imedia.org/" rel=3D"noreferrer" target=3D"_blank">https://lists.wikimedia.o=
rg/postorius/lists/wikitech-l.lists.wikimedia.org/</a></blockquote></div>

--000000000000cbc0b4065256911b--

--===============1704333319202582843==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
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/
--===============1704333319202582843==--