Switched to plausible-tracker and removed node-fetch

This commit is contained in:
Mawoka
2022-06-24 14:02:23 +02:00
parent cc33f16d6f
commit c19e362aaf
10 changed files with 59 additions and 100 deletions
+15
View File
@@ -18,8 +18,23 @@
import { initLocalizationContext } from '$lib/i18n';
import { browser } from '$app/env';
import Alert from '$lib/modals/alert.svelte';
import { plausible } from '$lib/stores';
/* afterNavigate(() => {
if (browser) {
if (latestPageVisitURl === window.location.href) {
return;
} else {
latestPageVisitURl = window.location.href;
plausible.trackPageview();
}
console.log('After nav');
}
});*/
if (browser) {
plausible.enableAutoPageviews();
plausible.enableAutoOutboundTracking();
pathname.set(window.location.pathname);
if (
localStorage.theme === 'dark' ||