From 24c7fc022b9a6c597b22ec55682f25daf186cd37 Mon Sep 17 00:00:00 2001 From: Kieran Date: Fri, 23 Nov 2018 17:36:05 +0800 Subject: [PATCH] bug fixes - Fix matomo site id on internal tracking - Track from handler for all url requests --- src/php/handler.php | 2 ++ src/php/tracking.php | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/php/handler.php b/src/php/handler.php index f3216ff..8b64520 100644 --- a/src/php/handler.php +++ b/src/php/handler.php @@ -3,6 +3,8 @@ //Startup if(StaticRedis::Connect() == True) { + Tracking::SendMatomoEvent(); + if(isset($_REQUEST["h"])) { $handler_name = $_REQUEST["h"]; if(file_exists($handler_name . '.php')){ diff --git a/src/php/tracking.php b/src/php/tracking.php index 8cde989..ba6ca34 100644 --- a/src/php/tracking.php +++ b/src/php/tracking.php @@ -15,8 +15,6 @@ $range = $this->GetRequestRange($file_size); Stats::TrackTransfer($id, $range->end - $range->start); } - - $this->SendMatomoEvent(); } function GetRequestRange($len) : ?object { @@ -42,9 +40,9 @@ return false; } - function SendMatomoEvent() : void { + public static function SendMatomoEvent() : void { $msg = "?" . http_build_query(array( - "idsite" => 1, + "idsite" => 3, "rec" => 1, "apiv" => 1, "_id" => isset($_COOKIE["VC:UID"]) ? $_COOKIE["VC:UID"] : uniqid(),