Skip to content

Commit

Permalink
Resolved linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dhochbaum-dcp committed Sep 20, 2024
1 parent a038251 commit e0a63de
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/utils/analytics.js
Original file line number Diff line number Diff line change
@@ -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])
}
}

Expand All @@ -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};
Expand Down

0 comments on commit e0a63de

Please sign in to comment.