Make analytics and error reporting optional

This commit is contained in:
Jon Staab
2025-03-03 15:09:58 -08:00
parent b399fa8dcc
commit ffb36af734
5 changed files with 69 additions and 10 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
/* eslint prefer-rest-params: 0 */
import {page} from "$app/stores"
import {getSetting} from "@app/state"
const w = window as any
@@ -12,7 +13,7 @@ w.plausible =
export const setupAnalytics = () => {
page.subscribe($page => {
if ($page.route) {
if ($page.route && getSetting("report_usage")) {
w.plausible("pageview", {u: $page.route.id})
}
})