bug fixes

- Fix matomo site id on internal tracking
- Track from handler for all url requests
This commit is contained in:
Kieran 2018-11-23 17:36:05 +08:00
parent 9a16f28d52
commit 24c7fc022b
2 changed files with 4 additions and 4 deletions

View File

@ -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')){

View File

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