Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/tracker.php')
-rw-r--r--js/tracker.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/js/tracker.php b/js/tracker.php
index ac85498cb9..b3191f9c49 100644
--- a/js/tracker.php
+++ b/js/tracker.php
@@ -27,8 +27,14 @@ define('PIWIK_DOCUMENT_ROOT', '..');
define('PIWIK_USER_PATH', '..');
require_once PIWIK_INCLUDE_PATH . '/libs/upgradephp/upgrade.php';
-require_once PIWIK_INCLUDE_PATH . '/core/Loader.php';
-\Piwik\Loader::init();
+
+// Composer autoloader
+if (file_exists(PIWIK_INCLUDE_PATH . '/vendor/autoload.php')) {
+ $path = PIWIK_INCLUDE_PATH . '/vendor/autoload.php'; // Piwik is the main project
+} else {
+ $path = PIWIK_INCLUDE_PATH . '/../../autoload.php'; // Piwik is installed as a dependency
+}
+require $path;
$file = '../piwik.js';