Update eventName=Screen to $screen to match PostHog's special behaviour (#7667)
This commit is contained in:
parent
5b999300b2
commit
8dd0722e04
5 changed files with 26 additions and 12 deletions
|
@ -472,17 +472,17 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
|||
}
|
||||
|
||||
public trackScreenChange(durationMs: number): void {
|
||||
const notLoggedInMap = {};
|
||||
const notLoggedInMap: Partial<Record<Views, ScreenEvent["screenName"]>> = {};
|
||||
notLoggedInMap[Views.LOADING] = "WebLoading";
|
||||
notLoggedInMap[Views.WELCOME] = "WebWelcome";
|
||||
notLoggedInMap[Views.LOGIN] = "WebLogin";
|
||||
notLoggedInMap[Views.REGISTER] = "WebRegister";
|
||||
notLoggedInMap[Views.FORGOT_PASSWORD] = "WebForgotPassword";
|
||||
notLoggedInMap[Views.WELCOME] = "Welcome";
|
||||
notLoggedInMap[Views.LOGIN] = "Login";
|
||||
notLoggedInMap[Views.REGISTER] = "Register";
|
||||
notLoggedInMap[Views.FORGOT_PASSWORD] = "ForgotPassword";
|
||||
notLoggedInMap[Views.COMPLETE_SECURITY] = "WebCompleteSecurity";
|
||||
notLoggedInMap[Views.E2E_SETUP] = "WebE2ESetup";
|
||||
notLoggedInMap[Views.SOFT_LOGOUT] = "WebSoftLogout";
|
||||
|
||||
const loggedInPageTypeMap = {};
|
||||
const loggedInPageTypeMap: Partial<Record<PageType, ScreenEvent["screenName"]>> = {};
|
||||
loggedInPageTypeMap[PageType.HomePage] = "Home";
|
||||
loggedInPageTypeMap[PageType.RoomView] = "Room";
|
||||
loggedInPageTypeMap[PageType.RoomDirectory] = "RoomDirectory";
|
||||
|
@ -495,7 +495,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
|||
notLoggedInMap[this.state.view];
|
||||
|
||||
return PosthogAnalytics.instance.trackEvent<ScreenEvent>({
|
||||
eventName: "Screen",
|
||||
eventName: "$screen",
|
||||
screenName,
|
||||
durationMs,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue