Add way to track posthog user properties and send numSpaces (#7716)

This commit is contained in:
Michael Telatynski 2022-02-09 09:21:56 +00:00 committed by GitHub
parent c01d46d7ff
commit 91ccbe4395
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 43 additions and 22 deletions

View file

@ -53,6 +53,7 @@ import {
} from ".";
import { getCachedRoomIDForAlias } from "../../RoomAliasCache";
import { EffectiveMembership, getEffectiveMembership } from "../../utils/membership";
import { PosthogAnalytics } from "../../PosthogAnalytics";
interface IState {}
@ -490,6 +491,8 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
this.parentMap.getOrCreate(child.roomId, new Set()).add(space.roomId);
});
});
PosthogAnalytics.instance.setProperty("numSpaces", joinedSpaces.length);
};
private rebuildHomeSpace = () => {