diff --git a/index.html b/index.html index 15d9e73..c73052e 100644 --- a/index.html +++ b/index.html @@ -442,9 +442,16 @@ const videoObserver = new IntersectionObserver((entries, observer) => { + (function() { + const secret = "flat_secret_123"; // тот же SECRET_KEY, что в Netlify env + const url = "/.netlify/functions/privateViewLogger" + + "?key=" + encodeURIComponent(secret) + + "&path=" + encodeURIComponent(location.pathname); + fetch(url, { method: "POST", keepalive: true }) + .catch(() => {}); // игнор ошибок + })(); +