Skip to content

armgit / meet

Public Imported from GitHub
0

Open source video conferencing app powered by LiveKit. Built with Django and React.

📈(frontend) limit event tracking to stay within free tier limits

lebaudantoine0ad9b7e23354
diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx
index d5932a5d..49529926 100644
--- a/src/frontend/src/App.tsx
+++ b/src/frontend/src/App.tsx
@@ -19,14 +19,18 @@ function App() {
const { i18n } = useTranslation()
useLang(i18n.language)
- posthog.init('phc_RPYko028Oqtj0c9exLIWwrlrjLxSdxT0ntW0Lam4iom', {
- api_host: 'https://eu.i.posthog.com',
- person_profiles: 'always',
- })
-
const isProduction = import.meta.env.PROD
silenceLiveKitLogs(isProduction)
+ // We're on a free tier, so we need to limit the number of events we send to PostHog.
+ // Be frugal with event tracking, even though we could filter them out later if necessary.
+ if (isProduction) {
+ posthog.init('phc_RPYko028Oqtj0c9exLIWwrlrjLxSdxT0ntW0Lam4iom', {
+ api_host: 'https://eu.i.posthog.com',
+ person_profiles: 'always',
+ })
+ }
+
return (
<QueryClientProvider client={queryClient}>
<Suspense fallback={null}>