Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion build.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ async function main() {
logEnv('CONSOLE MODE', env?.VITE_CONSOLE_MODE);
logEnv('APPWRITE ENDPOINT', env?.VITE_APPWRITE_ENDPOINT, 'relative');
logEnv('GROWTH ENDPOINT', env?.VITE_APPWRITE_GROWTH_ENDPOINT);
logEnv('GOOGLE ANALYTICS', env?.VITE_GA_PROJECT);
log();
logDelimiter();
await build();
Expand Down
12 changes: 0 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
"e2e": "playwright test tests/e2e"
},
"dependencies": {
"@analytics/google-analytics": "^1.0.7",
"@analytics/google-tag-manager": "^0.5.5",
"@appwrite.io/console": "^0.3.0",
"@appwrite.io/pink": "0.1.0-next.9",
"@appwrite.io/pink-icons": "^0.1.0-next.9",
Expand Down
16 changes: 1 addition & 15 deletions src/lib/actions/analytics.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import Analytics, { type AnalyticsPlugin } from 'analytics';
import googleAnalytics from '@analytics/google-analytics';
import googleTagManager from '@analytics/google-tag-manager';
import Plausible from 'plausible-tracker';
import { get } from 'svelte/store';
import { page } from '$app/stores';
Expand Down Expand Up @@ -49,19 +47,7 @@ const PLAUSIBLE_DOMAINS = {

const analytics = Analytics({
app: 'appwrite',
plugins: isCloud
? [
plausible(PLAUSIBLE_DOMAINS.CLOUD),
googleTagManager({
containerId: [VARS.GOOGLE_TAG || 'GTM-P3T9TBV']
})
]
: [
plausible(PLAUSIBLE_DOMAINS.SELF_HOSTED),
googleAnalytics({
measurementIds: [VARS.GOOGLE_ANALYTICS || 'G-R4YJ9JN8L4']
})
]
plugins: [plausible(isCloud ? PLAUSIBLE_DOMAINS.CLOUD : PLAUSIBLE_DOMAINS.SELF_HOSTED)]
});

export function trackEvent(name: string, data: object = null): void {
Expand Down
4 changes: 1 addition & 3 deletions src/lib/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ export const VARS = {
GROWTH_ENDPOINT: import.meta.env?.VITE_APPWRITE_GROWTH_ENDPOINT?.toString() as
| string
| undefined,
CONSOLE_MODE: import.meta.env?.VITE_CONSOLE_MODE?.toString() as string | undefined,
GOOGLE_ANALYTICS: import.meta.env?.VITE_GA_PROJECT?.toString() as string | undefined,
GOOGLE_TAG: import.meta.env?.VITE_GTM_PROJECT?.toString() as string | undefined
CONSOLE_MODE: import.meta.env?.VITE_CONSOLE_MODE?.toString() as string | undefined
};

export const ENV = {
Expand Down