mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
fix: simplify conditions
This commit is contained in:
1 parent
f40e141723
commit
d301664afd
1 file changed
+2
-9
@@ -5,18 +5,11 @@ import { page } from '$app/stores';
|
||||
import { user } from '$lib/stores/user';
|
||||
import { Mode } from '$lib/constants';
|
||||
|
||||
const project = import.meta.env.VITE_GA_PROJECT
|
||||
? import.meta.env.VITE_GA_PROJECT?.toString()
|
||||
: 'G-R4YJ9JN8L4';
|
||||
const mode = import.meta.env.VITE_CONSOLE_MODE
|
||||
? import.meta.env.VITE_CONSOLE_MODE?.toString()
|
||||
: Mode.SELF_HOSTED;
|
||||
|
||||
const analytics = Analytics({
|
||||
app: 'appwrite',
|
||||
plugins: [
|
||||
googleAnalytics({
|
||||
measurementIds: [project]
|
||||
measurementIds: [import.meta.env.VITE_GA_PROJECT?.toString() || 'G-R4YJ9JN8L4']
|
||||
})
|
||||
]
|
||||
});
|
||||
@@ -56,7 +49,7 @@ function sendEventToGrowth(event: string, path: string, data: object = null): vo
|
||||
action: event,
|
||||
label: event,
|
||||
url: window.location.origin + path,
|
||||
account: mode,
|
||||
account: import.meta.env.VITE_CONSOLE_MODE?.toString() || Mode.SELF_HOSTED,
|
||||
data: {
|
||||
email,
|
||||
name,
|
||||
|
||||
Reference in new issue
Block a user