Skip to content
Snippets Groups Projects
Commit 6cc3453f authored by Laurent's avatar Laurent
Browse files

dev #76258 fix JS_STAT parser for Matomoto

parent e0e1dfd1
3 merge requests!2703Master,!2701Hotline,!2697dev #76258 fix JS_STAT parser for Matomoto
Pipeline #4357 passed with stage
in 34 minutes and 10 seconds
- ticket #76258 : Piwik/Matomoto fixe l'extraction du siteId du code javascript
\ 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);
})();
......
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