more tracking; hide arb from welcome splash

This commit is contained in:
tim
2025-04-15 19:21:39 -04:00
parent f35b30e337
commit 14b8b50812
11 changed files with 48 additions and 17 deletions

View File

@@ -1,12 +1,15 @@
export let tracking_enabled = true
export let tracking_enabled = window.gtag !== undefined
export function track(event, info) {
if(tracking_enabled)
console.log('gtag', tracking_enabled)
else
console.log('tracking disabled')
export function track(...args) {
if (tracking_enabled) {
if (window.gtag !== undefined)
window.gtag('event', event, info)
else {
console.log('gtag not available')
tracking_enabled = false
try {
window.gtag('event', ...args)
} catch (e) {
}
}
}