mirror of
https://github.com/suitenumerique/docs.git
synced 2026-05-14 10:56:41 +02:00
🧐(frontend) dispatch the app version to posthog
We add the app version in Posthog events to be able to track which versions are being used and identify potential issues related to specific versions.
This commit is contained in:
@@ -60,6 +60,12 @@ export function PostHogProvider({
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
posthogInstance.debug();
|
||||
}
|
||||
|
||||
if (process.env.NEXT_PUBLIC_APP_VERSION) {
|
||||
posthogInstance.register({
|
||||
app_version: process.env.NEXT_PUBLIC_APP_VERSION,
|
||||
});
|
||||
}
|
||||
},
|
||||
capture_pageview: false,
|
||||
capture_pageleave: true,
|
||||
|
||||
Reference in New Issue
Block a user