Skip to content

Commit

Permalink
fix(core): add env info to tracks (#6313)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Mar 26, 2024
1 parent e9bc24b commit ffbfdb6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/frontend/core/src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 />;
Expand Down
1 change: 1 addition & 0 deletions tools/cli/src/webpack/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit ffbfdb6

Please sign in to comment.