父节点
37350e420a
当前提交
f1c1cb7afd
|
@ -47,7 +47,7 @@
|
|||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"MediaWiki\\Extension\\Matomo\\": "src/"
|
||||
"MediaWiki\\Extension\\MatomoNew\\": "src/"
|
||||
}
|
||||
},
|
||||
"require-dev": {
|
||||
|
|
|
@ -28,17 +28,17 @@
|
|||
},
|
||||
"Hooks": {
|
||||
"SkinAfterBottomScripts": [
|
||||
"MediaWiki\\Extension\\Matomo\\Hooks::MatomoSetup"
|
||||
"MediaWiki\\Extension\\MatomoNew\\Hooks::MatomoSetup"
|
||||
],
|
||||
"SpecialSearchResults": [
|
||||
"MediaWiki\\Extension\\Matomo\\Hooks::onSpecialSearchResults"
|
||||
"MediaWiki\\Extension\\MatomoNew\\Hooks::onSpecialSearchResults"
|
||||
],
|
||||
"SpecialSearchSetupEngine": [
|
||||
"MediaWiki\\Extension\\Matomo\\Hooks::onSpecialSearchSetupEngine"
|
||||
"MediaWiki\\Extension\\MatomoNew\\Hooks::onSpecialSearchSetupEngine"
|
||||
]
|
||||
},
|
||||
"AutoloadClasses": {
|
||||
"MediaWiki\\Extension\\Matomo\\Hooks": "src/Hooks.php"
|
||||
"MediaWiki\\Extension\\MatomoNew\\Hooks": "src/Hooks.php"
|
||||
},
|
||||
"manifest_version": 1
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace MediaWiki\Extension\Matomo;
|
||||
namespace MediaWiki\Extension\MatomoNew;
|
||||
|
||||
use RequestContext;
|
||||
|
||||
|
@ -19,7 +19,7 @@ class Hooks
|
|||
/**
|
||||
* Initialize the Matomo hook
|
||||
*
|
||||
* @param string $skin
|
||||
* @param object $skin
|
||||
* @param string &$text
|
||||
* @return bool
|
||||
*/
|
||||
|
@ -82,7 +82,7 @@ class Hooks
|
|||
|
||||
/**
|
||||
* Add Matomo script
|
||||
* @param string $title
|
||||
* @param object $title
|
||||
* @return string
|
||||
*/
|
||||
public static function addMatomo($title)
|
||||
|
@ -154,7 +154,7 @@ class Hooks
|
|||
|
||||
// Matomo script
|
||||
$script = <<<MATOMO
|
||||
<script>(function(){var a=new XMLHttpRequest();a.open("post","{$protocol}://{$matomoURL}/{$endpoint}?idsite={$idSite}&rec=1&send_image=1{$finalURL}{$finalActionName}{$finalUsername}{$finalURLRef}{$urlTrackingSearch}{$finalRand}");a.send()})();</script>
|
||||
<script>(function(){var a=new XMLHttpRequest;a.open("post","{$protocol}://{$matomoURL}/{$endpoint}?idsite={$idSite}&rec=1&send_image=1{$finalURL}{$finalActionName}{$finalUsername}{$finalURLRef}{$urlTrackingSearch}{$finalRand}");a.send()})();</script>
|
||||
<noscript><img src="{$protocol}://{$matomoURL}/{$endpoint}?idsite={$idSite}&rec=1&send_image=1{$finalURL}{$finalActionName}{$finalUsername}{$finalURLRef}{$urlTrackingSearch}{$finalRand}" width="1" height="1" alt="" /></noscript>
|
||||
MATOMO;
|
||||
|
||||
|
|
正在加载...
在新工单中引用