Admin analytics: heatmap per device, anteprima staff e analisi costi.
Separa heatmap mobile/desktop, opt-out analytics per operatori, dashboard costi con KPI e trend mensili. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -37,6 +37,11 @@
|
||||
return document.body && document.body.getAttribute("data-ga-id");
|
||||
}
|
||||
|
||||
function isAnalyticsSuppressed() {
|
||||
var meta = document.querySelector("meta[name='mltv-analytics-suppress']");
|
||||
return meta && meta.getAttribute("content") === "1";
|
||||
}
|
||||
|
||||
function loadGoogleAnalytics() {
|
||||
var id = measurementId();
|
||||
if (!id || window.__mltvGaLoaded) return;
|
||||
@@ -68,6 +73,7 @@
|
||||
}
|
||||
|
||||
function applyConsent(consent) {
|
||||
if (isAnalyticsSuppressed()) return;
|
||||
if (consent && consent.analytics) {
|
||||
loadGoogleAnalytics();
|
||||
if (typeof window.mltvSiteAnalyticsStart === "function") {
|
||||
@@ -94,6 +100,10 @@
|
||||
|
||||
if (acceptAll) {
|
||||
acceptAll.addEventListener("click", function () {
|
||||
if (isAnalyticsSuppressed()) {
|
||||
hideBanner(banner);
|
||||
return;
|
||||
}
|
||||
var c = writeConsent({ analytics: true });
|
||||
applyConsent(c);
|
||||
hideBanner(banner);
|
||||
|
||||
Reference in New Issue
Block a user