Nuova pagina sitoctt internals, Fix misti di pagine, Ristrutturazione file

This commit is contained in:
2024-12-08 19:03:10 +01:00
parent c509fa6445
commit 01e4470eaa
22 changed files with 114 additions and 49 deletions

17
static/res/analytics.js Normal file
View File

@ -0,0 +1,17 @@
(function(){
// TODO should use goatcounter script for full proper handling?
if (!["sitoctt.octt.eu.org", "http.sitoctt.octt.eu.org"].includes(location.hostname) || !location.search) {
return;
}
window.addEventListener('load', (function(){
var path = (location.pathname + location.search);
fetch('https://private-analytics-not-for-public-use.octt.eu.org/sitoctt/count?p=' + path /* + '&rnd=' + Date.now() */)
.catch(function(err){
console.error(err);
fetch('https://sitoctt.goatcounter.com/count?p=' + path);
});
}));
})();