fix(core): add env info to tracks (#6313)

This commit is contained in:
Brooooooklyn 2024-03-26 03:41:40 +00:00
parent e9bc24bf37
commit ffbfdb65a2
No known key found for this signature in database
GPG Key ID: 30B1140CE1C07C99
2 changed files with 5 additions and 0 deletions

View File

@ -14,6 +14,10 @@ function RootRouter() {
useEffect(() => {
mixpanel.track_pageview({
page: location.pathname,
appVersion: runtimeConfig.appVersion,
environment: runtimeConfig.appBuildType,
editorVersion: runtimeConfig.editorVersion,
isSelfHosted: Boolean(runtimeConfig.isSelfHosted),
});
}, [location]);
return <Outlet />;

View File

@ -349,6 +349,7 @@ export const createConfiguration: (
),
'process.env.SENTRY_DSN': JSON.stringify(process.env.SENTRY_DSN),
'process.env.BUILD_TYPE': JSON.stringify(process.env.BUILD_TYPE),
'process.env.MIXPANEL_TOKEN': `"${process.env.MIXPANEL_TOKEN}"`,
runtimeConfig: JSON.stringify(runtimeConfig),
}),
new CopyPlugin({