DaSchTour / matomo-mediawiki-extension

https://www.mediawiki.org/wiki/Extension:Piwik_Integration
17 stars 22 forks source link

Add bot inclusion? #48

Open Seb35 opened 3 months ago

Seb35 commented 3 months ago

By default Matomo does not track the bots (in the general sense on the Web: automatic agents doing some task, like crawling), but it is possible to add this tracking.

Is it something useful to add it in this extension? I mean a parameter $wgMatomoTrackWebBots, which will be false by default and could be set to true.


It is already possible to add $wgMatomoCustomJS = "_paq.push(['appendToTrackingUrl', 'bots=1']);"; but it is not possible to add &bots=1 in the image tracker, so the parameter $wgMatomoTrackWebBots would set both JS and non-JS parts.

Another more general way to solve this issue would be to add a free parameter $wgMatomoCustomImageParameters which could contain "&bots=1".

Seb35 commented 3 months ago

As a side note, MediaWiki bots (=users in the user group 'bot') are managed by the parameter $wgMatomoIgnoreBots (true by default). This task is about other bots.

samwilson commented 7 hours ago

Would this give useful aggregated information about misbehaving bots, e.g. their IP addresses for blocking purposes? I think that's the main use I'd have for it.