Discourse click tracking


I noticed links I click on the site go through a tracking redirect for example - https://discourse-mediawiki.wmflabs.org/clicks/track?url=https%3A%2F%2Fwww.mediawiki.org%2Fwiki%2FUser%3ATgr_(WMF)%2Fexternal_login&post_id=284&topic_id=71. Is this necessary? If not, can we disable it?

Also that particular click does not take me to mediawiki.org, but instead shows me a plain text page, for whatever reason. Does this happen for anyone else?


It shows me a Discourse error page saying “Oops! That page doesn’t exist or is private.”

Tracking links are used to count how many people look at it (the little number after the link). It is reasonably well done (does not mess up right-click-copy-URL the way e.g. Google result pages do) so I’m not bothered by it, but probably not particularly useful either.


Yeah it does feel a little bit like tracking, the first time you encounter it. I’m not sure there’s an easy way to turn it off. Currently “track external right clicks” is turned off (“Track external links that are right clicked (eg: open in new tab) disabled by default because it rewrites URLs”), and there doesn’t seem to be anything about left-clicks. :man_shrugging:

I don’t really mind if it’s on or off.

Oh and that link works for me and sends me to https://www.mediawiki.org/wiki/User:Tgr_(WMF)/external_login.


I know what tracking links are for but I’m not sure we need to do that here. I use Safari a fair amount and Mac has a “force-click” gesture which, when a link is clicked, opens the link in a pop-up which goes away on clicking outside the pop-up. It’s broken for this website though and I suspect it’s because of the tracking functionality. It’s also pretty weird that that link works differently for all of us. I’m wondering if it’s a bug.


The link opens the mw.org page normally for me now. Do you still see the plaintext page?


I see “Oops! That page doesn’t exist or is private.” now.


Let’s start with the second sentence: no, we cannot disable it (easily). There is no configuration setting for this.

This click tracking for URLs posted in discussions is harmless, nothing to do with SEO, metrics about users or even popular URLs across the site (I cannot find any of these in the admin dashboard). I find them useful, especially in long discussions. Seeing how many users have clicked a link already provides some information, but long discussions get an automatic summary at the top that also includes popular URLs, based on these clicks.


Here’s an error report that looks related:


Any update on this issue?
We are facing the same error message on any link of our forum (we are new in forum admin). In addition, we found out that https links work whereas http won’t (for instance the latest link of the latest post of this topic : http://clubstat.lpl-aix.fr/t/complements-suite-a-la-formation-modeles-mixtes-anastats/105).

We are unsure about how to “disable service workers”. Should that be done on the server side? or on any client machine? Could anyone give us some more information about that?
Thank s lot in advance!