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(),