Update analytics config (#428)

This commit is contained in:
Luke Vella 2023-01-23 11:53:38 +00:00 committed by GitHub
parent 1b65162ca9
commit 37f777cace
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,7 +35,7 @@ const MyApp: NextPage<AppProps> = ({ Component, pageProps }) => {
React.useEffect(() => { React.useEffect(() => {
if (process.env.NEXT_PUBLIC_ENABLE_ANALYTICS) { if (process.env.NEXT_PUBLIC_ENABLE_ANALYTICS) {
// calling inject directly to avoid having this run for self-hosted instances // 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} customDomain={process.env.NEXT_PUBLIC_PLAUSIBLE_DOMAIN}
trackOutboundLinks={true} trackOutboundLinks={true}
selfHosted={true} selfHosted={true}
enabled={!!process.env.NEXT_PUBLIC_PLAUSIBLE_DOMAIN} enabled={
typeof window !== undefined &&
!!process.env.NEXT_PUBLIC_PLAUSIBLE_DOMAIN
}
> >
<DefaultSeo <DefaultSeo
openGraph={{ openGraph={{