Skip to content

Commit a926596

Browse files
author
Marvin Zhang
committed
fix(analytics): update analytics tracking condition to use ENABLE_ANALYTICS env var
1 parent 7179830 commit a926596

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/ui/src/app/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ export default async function RootLayout({
6969
<Toast />
7070
</ProjectProvider>
7171
</ThemeProvider>
72-
{/* Only track analytics on web.lean-spec.dev, not for other users */}
73-
{process.env.NEXT_PUBLIC_VERCEL_URL?.includes('lean-spec.dev') && <Analytics />}
72+
{/* Analytics enabled via ENABLE_ANALYTICS env var in Vercel */}
73+
{process.env.ENABLE_ANALYTICS === 'true' && <Analytics />}
7474
</body>
7575
</html>
7676
);

0 commit comments

Comments
 (0)