Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

Update analytics config (#428)

Luke Vella37f777cace5b
diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx
index 7af15cef2..41a180a19 100644
--- a/src/pages/_app.tsx
+++ b/src/pages/_app.tsx
@@ -35,7 +35,7 @@ const MyApp: NextPage<AppProps> = ({ Component, pageProps }) => {
React.useEffect(() => {
if (process.env.NEXT_PUBLIC_ENABLE_ANALYTICS) {
// calling inject directly to avoid having this run for self-hosted instances
- inject();
+ inject({ debug: false });
}
}, []);
@@ -49,7 +49,10 @@ const MyApp: NextPage<AppProps> = ({ Component, pageProps }) => {
customDomain={process.env.NEXT_PUBLIC_PLAUSIBLE_DOMAIN}
trackOutboundLinks={true}
selfHosted={true}
- enabled={!!process.env.NEXT_PUBLIC_PLAUSIBLE_DOMAIN}
+ enabled={
+ typeof window !== undefined &&
+ !!process.env.NEXT_PUBLIC_PLAUSIBLE_DOMAIN
+ }
>
<DefaultSeo
openGraph={{