Rebase IgnoreEditors feature on 4.0.0
这个提交包含在:
当前提交
04d2406233
|
@ -92,6 +92,11 @@ class MatomoHooks {
|
|||
return '<!-- Matomo tracking is disabled for users with \'protect\' rights (i.e., sysops) -->';
|
||||
}
|
||||
|
||||
// Ignore Wiki Editors
|
||||
if ( $wgUser->isAllowed( 'edit' ) && self::getParameter( 'IgnoreEditors' ) ) {
|
||||
return "<!-- Matomo tracking is disabled for users with 'edit' rights -->";
|
||||
}
|
||||
|
||||
$idSite = self::getParameter( 'IDSite' );
|
||||
$matomoURL = self::getParameter( 'URL' );
|
||||
$protocol = self::getParameter( 'Protocol' );
|
||||
|
|
|
@ -47,7 +47,11 @@ but **ALL** steps are necessary:
|
|||
Custom variables
|
||||
------------------------
|
||||
* Disable cookies by setting the ```$wgMatomoDisableCookies``` variable to ```false```.
|
||||
> For example: $wgMatomoDsiableCookies = false;
|
||||
> For example: $wgMatomoDisableCookies = false;
|
||||
|
||||
* Ignore regular editors: set ```$wgMatomoIgnoreEditors``` to ```true```
|
||||
* Ignore Bots: set ```$wgMatomoIgnoreBots``` to ```true```
|
||||
* Ignore sysop users: set ```$wgMatomoIgnoreSysops``` to ```true```
|
||||
|
||||
* To define custom javascript tags in the Matomo javascript code, its possible to define the $wgMatomoCustomJS variable. For example if you have a single setting to insert; use the following code:
|
||||
> ```$wgMatomoCustomJS = "_paq.push(['trackGoal', '1']);"```
|
正在加载...
在新工单中引用
屏蔽一个用户