Skip to content

Commit

Permalink
Don't use google analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
camillobruni committed Apr 2, 2024
1 parent eaf223a commit 98a14d2
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 30 deletions.
13 changes: 0 additions & 13 deletions src/_js/legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,4 @@
history.replaceState({}, '', location.pathname);
}

// Google Analytics.
var UA_ID = 'UA-65961526-1';
self.GoogleAnalyticsObject = 'ga';
self.ga = function() {
ga.q.push(arguments);
};
ga.l = +new Date();
ga.q = [];
ga('create', UA_ID, 'auto');
ga('set', 'referrer', document.referrer.split('?')[0]);
ga('send', 'pageview');
insertScript('https://www.google-analytics.com/analytics.js');

}());
15 changes: 0 additions & 15 deletions src/_js/main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,3 @@ if (location.search.includes('utm_source')) {
// set the location to `location.pathname` directly.
history.replaceState({}, '', location.pathname);
}

// Google Analytics.
const UA_ID = 'UA-65961526-1';
self.GoogleAnalyticsObject = 'ga';
self.ga = (...args) => {
ga.q.push(args);
};
ga.l = Date.now();
ga.q = [];
ga('create', UA_ID, 'auto');
ga('set', 'referrer', document.referrer.split('?')[0]);
ga('send', 'pageview');
const gaScript = document.createElement('script');
gaScript.src = 'https://www.google-analytics.com/analytics.js';
document.head.appendChild(gaScript);
2 changes: 0 additions & 2 deletions src/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,4 @@ workbox.core.setCacheNameDetails({
// Note: this is populated at build time.
workbox.precaching.precacheAndRoute([]);

workbox.googleAnalytics.initialize({});

workbox.skipWaiting();

0 comments on commit 98a14d2

Please sign in to comment.