mirror of https://github.com/vector-im/riot-web
Update eventName=Screen to $screen to match PostHog's special behaviour (#7667)
parent
5b999300b2
commit
8dd0722e04
|
@ -90,7 +90,7 @@
|
|||
"katex": "^0.12.0",
|
||||
"lodash": "^4.17.20",
|
||||
"maplibre-gl": "^1.15.2",
|
||||
"matrix-analytics-events": "github:matrix-org/matrix-analytics-events.git#1eab4356548c97722a183912fda1ceabbe8cc7c1",
|
||||
"matrix-analytics-events": "github:matrix-org/matrix-analytics-events.git#dfa6feaa12bcfc8e99b05a148e12fff7f9d62f08",
|
||||
"matrix-events-sdk": "^0.0.1-beta.6",
|
||||
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop",
|
||||
"matrix-widget-api": "^0.1.0-beta.18",
|
||||
|
|
|
@ -3,11 +3,17 @@
|
|||
set -ex
|
||||
|
||||
scripts/fetchdep.sh matrix-org matrix-js-sdk
|
||||
|
||||
pushd matrix-js-sdk
|
||||
yarn link
|
||||
yarn install --pure-lockfile $@
|
||||
popd
|
||||
|
||||
yarn link matrix-js-sdk
|
||||
scripts/fetchdep.sh matrix-org matrix-analytics-events main
|
||||
pushd matrix-analytics-events
|
||||
yarn link
|
||||
yarn install --pure-lockfile $@
|
||||
popd
|
||||
|
||||
yarn link matrix-js-sdk
|
||||
yarn link matrix-analytics-events
|
||||
yarn install --pure-lockfile $@
|
||||
|
|
|
@ -16,8 +16,16 @@ yarn link
|
|||
yarn install --pure-lockfile
|
||||
popd
|
||||
|
||||
# Set up the js-sdk first
|
||||
scripts/fetchdep.sh matrix-org matrix-analytics-events main
|
||||
pushd matrix-analytics-events
|
||||
yarn link
|
||||
yarn install --pure-lockfile
|
||||
popd
|
||||
|
||||
# Now set up the react-sdk
|
||||
yarn link matrix-js-sdk
|
||||
yarn link matrix-analytics-events
|
||||
yarn link
|
||||
yarn install --pure-lockfile
|
||||
yarn reskindex
|
||||
|
|
|
@ -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,
|
||||
});
|
||||
|
|
|
@ -6214,9 +6214,9 @@ mathml-tag-names@^2.1.3:
|
|||
resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz#4ddadd67308e780cf16a47685878ee27b736a0a3"
|
||||
integrity sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==
|
||||
|
||||
"matrix-analytics-events@github:matrix-org/matrix-analytics-events.git#1eab4356548c97722a183912fda1ceabbe8cc7c1":
|
||||
"matrix-analytics-events@github:matrix-org/matrix-analytics-events.git#dfa6feaa12bcfc8e99b05a148e12fff7f9d62f08":
|
||||
version "0.0.1"
|
||||
resolved "https://codeload.github.com/matrix-org/matrix-analytics-events/tar.gz/1eab4356548c97722a183912fda1ceabbe8cc7c1"
|
||||
resolved "https://codeload.github.com/matrix-org/matrix-analytics-events/tar.gz/dfa6feaa12bcfc8e99b05a148e12fff7f9d62f08"
|
||||
|
||||
matrix-events-sdk@^0.0.1-beta.6:
|
||||
version "0.0.1-beta.6"
|
||||
|
|
Loading…
Reference in New Issue