PluginProbe ʕ •ᴥ•ʔ
Matomo Analytics – Powerful, Privacy-First Insights for WordPress / 5.0.1
Matomo Analytics – Powerful, Privacy-First Insights for WordPress v5.0.1
5.11.1 5.11.0 5.10.2 5.10.1 trunk 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.3.0 1.3.1 1.3.2 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.2 4.1.3 4.10.0 4.11.0 4.12.0 4.13.0 4.13.2 4.13.3 4.13.4 4.13.5 4.14.0 4.14.1 4.14.2 4.15.0 4.15.1 4.15.2 4.15.3 4.2.0 4.3.0 4.3.1 4.4.1 4.4.2 4.5.0 4.6.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.10.0 5.2.0 5.2.1 5.2.2 5.3.0 5.3.1 5.3.2 5.3.3 5.6.0 5.6.1 5.7.0 5.7.1 5.8.0 5.8.1 5.8.2
matomo / app / piwik.php
matomo / app Last commit date
config 2 years ago core 2 years ago js 2 years ago lang 2 years ago libs 2 years ago node_modules 2 years ago plugins 2 years ago vendor 2 years ago .htaccess 6 years ago DIObject.php 2 years ago LEGALNOTICE 2 years ago LICENSE 2 years ago LegacyAutoloader.php 2 years ago PRIVACY.md 5 years ago README.md 3 years ago SECURITY.md 2 years ago bootstrap.php 2 years ago console 6 years ago favicon.ico 2 years ago index.php 2 years ago matomo.js 2 years ago matomo.php 2 years ago offline-service-worker.js 5 years ago piwik.js 2 years ago piwik.php 2 years ago robots.txt 5 years ago
piwik.php
74 lines
1 <?php
2
3 namespace {
4 /**
5 * Matomo - free/libre analytics platform
6 *
7 * @link https://matomo.org
8 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
9 */
10 use Piwik\SettingsServer;
11 use Piwik\Tracker\RequestSet;
12 use Piwik\Tracker;
13 use Piwik\Tracker\Handler;
14 use Piwik\API\CORSHandler;
15 @\ignore_user_abort(\true);
16 // Note: if you wish to debug the Tracking API please see this documentation:
17 // http://developer.piwik.org/api-reference/tracking-api#debugging-the-tracker
18 if (!\defined('PIWIK_DOCUMENT_ROOT')) {
19 \define('PIWIK_DOCUMENT_ROOT', \dirname(__FILE__) == '/' ? '' : \dirname(__FILE__));
20 }
21 if (\file_exists(\PIWIK_DOCUMENT_ROOT . '/bootstrap.php')) {
22 require_once \PIWIK_DOCUMENT_ROOT . '/bootstrap.php';
23 }
24 if (!\defined('PIWIK_INCLUDE_PATH')) {
25 \define('PIWIK_INCLUDE_PATH', \PIWIK_DOCUMENT_ROOT);
26 }
27 require_once \PIWIK_INCLUDE_PATH . '/core/bootstrap.php';
28 require_once \PIWIK_INCLUDE_PATH . '/core/Plugin/Controller.php';
29 require_once \PIWIK_INCLUDE_PATH . '/core/Exception/NotYetInstalledException.php';
30 require_once \PIWIK_INCLUDE_PATH . '/core/Plugin/ControllerAdmin.php';
31 require_once \PIWIK_INCLUDE_PATH . '/core/Singleton.php';
32 require_once \PIWIK_INCLUDE_PATH . '/core/Plugin/Manager.php';
33 require_once \PIWIK_INCLUDE_PATH . '/core/Plugin.php';
34 require_once \PIWIK_INCLUDE_PATH . '/core/Common.php';
35 require_once \PIWIK_INCLUDE_PATH . '/core/Piwik.php';
36 require_once \PIWIK_INCLUDE_PATH . '/core/IP.php';
37 require_once \PIWIK_INCLUDE_PATH . '/core/UrlHelper.php';
38 require_once \PIWIK_INCLUDE_PATH . '/core/Url.php';
39 require_once \PIWIK_INCLUDE_PATH . '/core/SettingsPiwik.php';
40 require_once \PIWIK_INCLUDE_PATH . '/core/SettingsServer.php';
41 require_once \PIWIK_INCLUDE_PATH . '/core/Tracker.php';
42 require_once \PIWIK_INCLUDE_PATH . '/core/Config.php';
43 require_once \PIWIK_INCLUDE_PATH . '/core/Tracker/Cache.php';
44 require_once \PIWIK_INCLUDE_PATH . '/core/Tracker/Request.php';
45 require_once \PIWIK_INCLUDE_PATH . '/core/Cookie.php';
46 require_once \PIWIK_INCLUDE_PATH . '/core/API/CORSHandler.php';
47 SettingsServer::setIsTrackerApiRequest();
48 $environment = new \Piwik\Application\Environment('tracker');
49 try {
50 $environment->init();
51 } catch (\Piwik\Exception\NotYetInstalledException $e) {
52 die($e->getMessage());
53 }
54 Tracker::loadTrackerEnvironment();
55 $corsHandler = new CORSHandler();
56 $corsHandler->handle();
57 $tracker = new Tracker();
58 $requestSet = new RequestSet();
59 \ob_start();
60 try {
61 $handler = Handler\Factory::make();
62 $response = $tracker->main($handler, $requestSet);
63 if (!\is_null($response)) {
64 echo $response;
65 }
66 } catch (\Exception $e) {
67 echo "Error:" . $e->getMessage();
68 exit(1);
69 }
70 if (\ob_get_level() > 1) {
71 \ob_end_flush();
72 }
73 }
74