Send how many favorited rooms a user has to Posthog (#7772)

This commit is contained in:
Michael Telatynski 2022-02-10 10:02:34 +00:00 committed by GitHub
parent 871032e1bc
commit f6565bfbc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 47 additions and 15 deletions

View file

@ -23,6 +23,7 @@ import Views from "./Views";
import { PosthogAnalytics } from "./PosthogAnalytics";
export type ScreenName = ScreenEvent["screenName"];
export type InteractionName = InteractionEvent["name"];
const notLoggedInMap: Record<Exclude<Views, Views.LOGGED_IN>, ScreenName> = {
[Views.LOADING]: "WebLoading",
@ -90,7 +91,7 @@ export default class PosthogTrackers {
this.trackPage();
}
public static trackInteraction(name: InteractionEvent["name"], ev?: SyntheticEvent): void {
public static trackInteraction(name: InteractionName, ev?: SyntheticEvent): void {
let interactionType: InteractionEvent["interactionType"];
if (ev?.type === "click") {
interactionType = "Pointer";