Skip to content

Commit

Permalink
enabled is false if setting is disabled
Browse files Browse the repository at this point in the history
also adds commented out props for when we switch to selfhosted
  • Loading branch information
buckhalt committed Nov 3, 2023
1 parent aa4bf5e commit fc797be
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { api } from '~/trpc/server';
import { Toaster } from '~/components/ui/toaster';
import { revalidatePath, revalidateTag } from 'next/cache';
import PlausibleProvider from 'next-plausible';
import { env } from '~/env.mjs';

export const metadata = {
title: 'Network Canvas Fresco',
Expand All @@ -31,10 +32,14 @@ async function RootLayout({ children }: { children: React.ReactNode }) {
<head>
<PlausibleProvider
domain="fresco.networkcanvas.com"
trackLocalhost={true}
enabled={true}
taggedEvents={true}
manualPageviews={true}
trackLocalhost={env.NODE_ENV === 'development' ? true : false}
// for testing, remove env.NODE_ENV === 'production' enable tracking in dev
enabled={appSettings?.allowAnalytics && env.NODE_ENV === 'production'}
// Uncomment the following lines to use self hosted
// selfHosted={true}
// customDomain="https://analytics.networkcanvas.com"
/>
</head>
<body>
Expand Down

0 comments on commit fc797be

Please sign in to comment.