Skip to content

Commit 4f95b8f

Browse files
committed
Honestly
1 parent 13f3b98 commit 4f95b8f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

basics/next-app-router/instrumentation-client.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY!, {
1515
opt_out_useragent_filter: true, // This disables bot detection
1616
// @ignoreBlockEnd
1717
});
18+
19+
//IMPORTANT: Never combine this approach with other client-side PostHog initialization approaches, especially components like a PostHogProvider. instrumentation-client.ts is the correct solution for initializating client-side PostHog in Next.js 15.3+ apps.

basics/next-pages-router/instrumentation-client.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY!, {
1515
opt_out_useragent_filter: true, // This disables bot detection
1616
// @ignoreBlockEnd
1717
});
18+
19+
//IMPORTANT: Never combine this approach with other client-side PostHog initialization approaches, especially components like a PostHogProvider. instrumentation-client.ts is the correct solution for initializating client-side PostHog in Next.js 15.3+ apps.

0 commit comments

Comments
 (0)