feat: more events tracking for SaaS (#6234)

This commit is contained in:
Shivam Mishra
2023-01-18 11:23:40 +05:30
committed by GitHub
parent 1df1b1f8e4
commit 37b9816827
40 changed files with 539 additions and 50 deletions

View File

@@ -10,9 +10,8 @@ import {
isOnUnattendedView,
} from './helpers/actionHelpers';
import messageReadActions from './actions/messageReadActions';
import AnalyticsHelper, {
ANALYTICS_EVENTS,
} from '../../../helper/AnalyticsHelper';
import AnalyticsHelper from '../../../helper/AnalyticsHelper';
import { CONVERSATION_EVENTS } from '../../../helper/AnalyticsHelper/events';
// actions
const actions = {
getConversation: async ({ commit }, conversationId) => {
@@ -176,8 +175,8 @@ const actions = {
const response = await MessageApi.create(pendingMessage);
AnalyticsHelper.track(
pendingMessage.private
? ANALYTICS_EVENTS.SENT_PRIVATE_NOTE
: ANALYTICS_EVENTS.SENT_MESSAGE
? CONVERSATION_EVENTS.CONVERSATION.SENT_PRIVATE_NOTE
: CONVERSATION_EVENTS.CONVERSATION.SENT_MESSAGE
);
commit(types.ADD_MESSAGE, {
...response.data,