Commit b4b24450 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

Merge branch 'dev#76258_piwikmatomoto_fixe_l_extraction_du_siteid' into 'hotline'

dev #76258 fix JS_STAT parser for Matomoto

See merge request !2697
parents 8601127d ce254edf
Pipeline #4405 passed with stage
in 39 minutes and 2 seconds
- ticket #76258 : Matomo : correction de la lecture des indentifiants dans le coode d'intégration Javascript qui se trouve dans JS_STAT.
\ No newline at end of file
......@@ -73,6 +73,6 @@ class Class_AdminVar_JsStat {
public function getPiwikSiteId() {
$script = Class_AdminVar::get('JS_STAT');
preg_match_all("/setSiteId\',([^\]]+)\]\)/i", $script, $matches);
return isset($matches[1][0]) ? trim($matches[1][0]) : '';
return isset($matches[1][0]) ? trim($matches[1][0], " \t\n\r\0\x0B'\"") : '';
}
}
\ No newline at end of file
......@@ -46,7 +46,7 @@ class PiwikFixtures {
(function() {
var u=\"//sandbox.pergame.net/piwik/\";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 8]);
_paq.push(['setSiteId', '8']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment