From 3cc83c531d91ee975423878a5a0ad318887fe766 Mon Sep 17 00:00:00 2001 From: Maxim Slipenko Date: Wed, 26 Jun 2024 18:46:34 +0300 Subject: [PATCH] fix analytics --- src/analytics.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/analytics.js b/src/analytics.js index f90fbfc..da7ad6f 100644 --- a/src/analytics.js +++ b/src/analytics.js @@ -11,17 +11,18 @@ class Analytics { document.addEventListener("DOMContentLoaded", function () { const popupPVZId = el("popup-pvz-id"); - const pvzData = { pvz: popupPVZId.innerText }; const popupLink = el("popup-link"); const sourceLink = el("popup-source"); const infoPopupButton = el("info-popup-button"); popupLink.addEventListener("click", function () { + const pvzData = { pvz: popupPVZId.innerText }; Analytics.event("pvz-link-clicked", pvzData); }); sourceLink.addEventListener("click", function () { + const pvzData = { pvz: popupPVZId.innerText }; Analytics.event("pvz-source-clicked", pvzData); });