mirror of
https://gitlab.com/octtspacc/sitoctt
synced 2025-06-05 22:09:20 +02:00
Nuova pagina sitoctt internals, Fix misti di pagine, Ristrutturazione file
This commit is contained in:
17
static/res/analytics.js
Normal file
17
static/res/analytics.js
Normal 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);
|
||||
});
|
||||
}));
|
||||
|
||||
})();
|
Reference in New Issue
Block a user