From e0a63de1416d30e166e7cac71277c57f3bd2a861 Mon Sep 17 00:00:00 2001 From: David Hochbaum Date: Fri, 20 Sep 2024 11:09:40 -0400 Subject: [PATCH] Resolved linting errors --- app/utils/analytics.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/utils/analytics.js b/app/utils/analytics.js index 3cf5222..533c34d 100644 --- a/app/utils/analytics.js +++ b/app/utils/analytics.js @@ -1,9 +1,9 @@ export function analytics(eventData) { if(eventData.value) { - _paq.push(['trackEvent', eventData.category, eventData.action, eventData.name, eventData.value]) + window._paq.push(['trackEvent', eventData.category, eventData.action, eventData.name, eventData.value]) } else { - _paq.push(['trackEvent', eventData.category, eventData.action, eventData.name]) + window._paq.push(['trackEvent', eventData.category, eventData.action, eventData.name]) } } @@ -18,11 +18,11 @@ export function initializeMatomoTagManager(containerID) { // To track pageviews, watching for changes to location.pathname let previousUrlPath = location.pathname; - const observer = new MutationObserver(function(mutations) { + const observer = new MutationObserver(function() { if (location.pathname !== previousUrlPath) { previousUrlPath = location.pathname; - _paq.push(['setCustomUrl', location.href]); - _paq.push(['trackPageView']); + window._paq.push(['setCustomUrl', location.href]); + window._paq.push(['trackPageView']); } }); const config = {subtree: true, childList: true};