Topic on Extension talk:HitCounters

"View statistics" in SpecialPages:Statistics

6
Ulf Dunkel (talkcontribs)

Is it true that the "View statistics" are being generated by the HitCounters extension?

If you e.g. watch https://en.intactiwiki.org/wiki/Special:Statistics you see this section prior to the "Most viewed pages" section which indeed reflects the hits counted by HitCounters since 2021-03-22. If so, then no other global hits counter tool might be necessary to track the total hits of a mediawiki installation, right?

I just ask this because I didn't find any information about the side-effects of HitCounters to the SpecialPages:Statistics.

WikiForMen (talkcontribs)
Ulf Dunkel (talkcontribs)

I have installed the RefreshSiteStatsTable extension now and ran it. But it makes me wonder that before I ran it, e.g. my French wiki had 8 articles, and afterwards it only counts 7. Does your script exclude the Main page? See <https://fr.intactiwiki.org/index.php/Accueil> as an example.

WikiForMen (talkcontribs)

Please take a look at the code, which is very simple:

$anzahl_counted_good = (int)$this->mDBr->selectField( 'page', 'COUNT(*)', [ 'page_namespace' => NS_MAIN, 'page_is_redirect' => 0 ], __METHOD__ );

It is a simple DB query how many entries are in the table page that have the namespace NS_MAIN and are NOT a redirect. And then updates the field ss_good_articles in the table site_stats is updated. The main page is treated like all the others. In my wiki for example the main page is not counted, because there the main page is not in the namespace NS_MAIN, but in the namespace project. The extension does in the browser what the maintenance script

php maintenance/initSiteStats.php --update

does on the command line of the server.

The result should be the same according to Adam Riese. ;-) --WikiForMen (talk) 11:16, 8 April 2021 (UTC)

WikiForMen (talkcontribs)
WikiForMen (talkcontribs)

The HitCounters extension is, of course, quite primitive tool. It does not distinguish visits from reds and other. Therefore, other tools can provide finer and completely different results. Nevertheless, I appreciate HitCounters, because I have all visits since the beginning of counting for all articles and so I can recognize by relative changes/shifts, which articles currently experience special interest.--WikiForMen (talk) 12:28, 6 April 2021 (UTC)

Reply to ""View statistics" in SpecialPages:Statistics"