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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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,
});
}