PluginProbe ʕ •ᴥ•ʔ
Matomo Analytics – Powerful, Privacy-First Insights for WordPress / 5.12.1
Matomo Analytics – Powerful, Privacy-First Insights for WordPress v5.12.1
5.12.1 5.12.0 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 weeks ago core 2 weeks ago js 2 weeks ago lang 2 weeks ago libs 2 months ago node_modules 5 months ago plugins 2 weeks ago vendor 2 weeks ago .htaccess 6 years ago AGENTS.md 1 month ago DIObject.php 2 years ago LEGALNOTICE 8 months ago LICENSE 2 years ago LegacyAutoloader.php 2 years ago PRIVACY.md 5 years ago README.md 8 months ago SECURITY.md 2 years ago bootstrap.php 2 months ago console 6 years ago favicon.ico 2 years ago index.php 2 years ago matomo.js 2 weeks ago matomo.php 2 years ago offline-service-worker.js 5 years ago piwik.js 2 weeks ago piwik.php 8 months ago robots.txt 5 years ago
piwik.php
75 lines
1 <?php
2
3 namespace {
4 /**
5 * Matomo - free/libre analytics platform
6 *
7 * @link https://matomo.org
8 * @license https://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 // https://developer.matomo.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/Request/AuthenticationToken.php';
29 require_once \PIWIK_INCLUDE_PATH . '/core/Plugin/Controller.php';
30 require_once \PIWIK_INCLUDE_PATH . '/core/Exception/NotYetInstalledException.php';
31 require_once \PIWIK_INCLUDE_PATH . '/core/Plugin/ControllerAdmin.php';
32 require_once \PIWIK_INCLUDE_PATH . '/core/Singleton.php';
33 require_once \PIWIK_INCLUDE_PATH . '/core/Plugin/Manager.php';
34 require_once \PIWIK_INCLUDE_PATH . '/core/Plugin.php';
35 require_once \PIWIK_INCLUDE_PATH . '/core/Common.php';
36 require_once \PIWIK_INCLUDE_PATH . '/core/Piwik.php';
37 require_once \PIWIK_INCLUDE_PATH . '/core/IP.php';
38 require_once \PIWIK_INCLUDE_PATH . '/core/UrlHelper.php';
39 require_once \PIWIK_INCLUDE_PATH . '/core/Url.php';
40 require_once \PIWIK_INCLUDE_PATH . '/core/SettingsPiwik.php';
41 require_once \PIWIK_INCLUDE_PATH . '/core/SettingsServer.php';
42 require_once \PIWIK_INCLUDE_PATH . '/core/Tracker.php';
43 require_once \PIWIK_INCLUDE_PATH . '/core/Config.php';
44 require_once \PIWIK_INCLUDE_PATH . '/core/Tracker/Cache.php';
45 require_once \PIWIK_INCLUDE_PATH . '/core/Tracker/Request.php';
46 require_once \PIWIK_INCLUDE_PATH . '/core/Cookie.php';
47 require_once \PIWIK_INCLUDE_PATH . '/core/API/CORSHandler.php';
48 SettingsServer::setIsTrackerApiRequest();
49 $environment = new \Piwik\Application\Environment('tracker');
50 try {
51 $environment->init();
52 } catch (\Piwik\Exception\NotYetInstalledException $e) {
53 die($e->getMessage());
54 }
55 Tracker::loadTrackerEnvironment();
56 $corsHandler = new CORSHandler();
57 $corsHandler->handle();
58 $tracker = new Tracker();
59 $requestSet = new RequestSet();
60 \ob_start();
61 try {
62 $handler = Handler\Factory::make();
63 $response = $tracker->main($handler, $requestSet);
64 if (!\is_null($response)) {
65 echo $response;
66 }
67 } catch (\Exception $e) {
68 echo "Error:" . $e->getMessage();
69 exit(1);
70 }
71 if (\ob_get_level() > 1) {
72 \ob_end_flush();
73 }
74 }
75