forked from Kieran/void.cat
bug fixes
- Fix matomo site id on internal tracking - Track from handler for all url requests
This commit is contained in:
parent
9a16f28d52
commit
24c7fc022b
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
//Startup
|
//Startup
|
||||||
if(StaticRedis::Connect() == True) {
|
if(StaticRedis::Connect() == True) {
|
||||||
|
Tracking::SendMatomoEvent();
|
||||||
|
|
||||||
if(isset($_REQUEST["h"])) {
|
if(isset($_REQUEST["h"])) {
|
||||||
$handler_name = $_REQUEST["h"];
|
$handler_name = $_REQUEST["h"];
|
||||||
if(file_exists($handler_name . '.php')){
|
if(file_exists($handler_name . '.php')){
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
$range = $this->GetRequestRange($file_size);
|
$range = $this->GetRequestRange($file_size);
|
||||||
Stats::TrackTransfer($id, $range->end - $range->start);
|
Stats::TrackTransfer($id, $range->end - $range->start);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->SendMatomoEvent();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function GetRequestRange($len) : ?object {
|
function GetRequestRange($len) : ?object {
|
||||||
@ -42,9 +40,9 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function SendMatomoEvent() : void {
|
public static function SendMatomoEvent() : void {
|
||||||
$msg = "?" . http_build_query(array(
|
$msg = "?" . http_build_query(array(
|
||||||
"idsite" => 1,
|
"idsite" => 3,
|
||||||
"rec" => 1,
|
"rec" => 1,
|
||||||
"apiv" => 1,
|
"apiv" => 1,
|
||||||
"_id" => isset($_COOKIE["VC:UID"]) ? $_COOKIE["VC:UID"] : uniqid(),
|
"_id" => isset($_COOKIE["VC:UID"]) ? $_COOKIE["VC:UID"] : uniqid(),
|
||||||
|
Loading…
Reference in New Issue
Block a user