mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
feat: use plausible for self-hosted
This commit is contained in:
@@ -38,17 +38,24 @@ function plausible(domain: string): AnalyticsPlugin {
|
||||
};
|
||||
}
|
||||
|
||||
const PLAUSIBLE_DOMAINS = {
|
||||
CLOUD: 'cloud.appwrite.io',
|
||||
GLOBAL: 'console.appwrite',
|
||||
SELF_HOSTED: 'self-hosted.appwrite'
|
||||
};
|
||||
|
||||
const analytics = Analytics({
|
||||
app: 'appwrite',
|
||||
plugins:
|
||||
isCloud && browser
|
||||
? [
|
||||
plausible('cloud.appwrite.io'),
|
||||
plausible(`${PLAUSIBLE_DOMAINS.GLOBAL},${PLAUSIBLE_DOMAINS.CLOUD}`),
|
||||
googleTagManager({
|
||||
containerId: [VARS.GOOGLE_TAG || 'GTM-P3T9TBV']
|
||||
})
|
||||
]
|
||||
: [
|
||||
plausible(`${PLAUSIBLE_DOMAINS.GLOBAL},${PLAUSIBLE_DOMAINS.SELF_HOSTED}`),
|
||||
googleAnalytics({
|
||||
measurementIds: [VARS.GOOGLE_ANALYTICS || 'G-R4YJ9JN8L4']
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user