1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-07 21:23:00 +03:00

Wire up more posthog properties and interactions (#7763)

This commit is contained in:
Michael Telatynski
2022-02-10 13:53:07 +00:00
committed by GitHub
parent be324df953
commit 20e9d0c159
6 changed files with 43 additions and 8 deletions

View File

@@ -91,7 +91,7 @@ export default class PosthogTrackers {
this.trackPage();
}
public static trackInteraction(name: InteractionName, ev?: SyntheticEvent): void {
public static trackInteraction(name: InteractionName, ev?: SyntheticEvent, index?: number): void {
let interactionType: InteractionEvent["interactionType"];
if (ev?.type === "click") {
interactionType = "Pointer";
@@ -102,6 +102,7 @@ export default class PosthogTrackers {
PosthogAnalytics.instance.trackEvent<InteractionEvent>({
eventName: "Interaction",
interactionType,
index,
name,
});
}