Basic threads analytics into Posthog MVP (#7871)
This commit is contained in:
parent
182aedc3d4
commit
75e41b4c1c
10 changed files with 51 additions and 18 deletions
|
@ -345,12 +345,17 @@ export class SendMessageComposer extends React.Component<ISendMessageComposerPro
|
|||
return;
|
||||
}
|
||||
|
||||
PosthogAnalytics.instance.trackEvent<ComposerEvent>({
|
||||
const posthogEvent: ComposerEvent = {
|
||||
eventName: "Composer",
|
||||
isEditing: false,
|
||||
inThread: this.props.relation?.rel_type === RelationType.Thread,
|
||||
isReply: !!this.props.replyToEvent,
|
||||
});
|
||||
inThread: this.props.relation?.rel_type === RelationType.Thread,
|
||||
};
|
||||
if (posthogEvent.inThread) {
|
||||
const threadRoot = this.props.room.findEventById(this.props.relation.event_id);
|
||||
posthogEvent.startsThread = threadRoot?.getThread()?.events.length === 1;
|
||||
}
|
||||
PosthogAnalytics.instance.trackEvent<ComposerEvent>(posthogEvent);
|
||||
|
||||
// Replace emoticon at the end of the message
|
||||
if (SettingsStore.getValue('MessageComposerInput.autoReplaceEmoji')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue