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

@@ -5,6 +5,8 @@ import {
import types from '../../mutation-types';
import ContactAPI from '../../../api/contacts';
import AccountActionsAPI from '../../../api/accountActions';
import AnalyticsHelper from '../../../helper/AnalyticsHelper';
import { CONTACTS_EVENTS } from '../../../helper/AnalyticsHelper/events';
const buildContactFormData = contactParams => {
const formData = new FormData();
@@ -104,6 +106,8 @@ export const actions = {
const response = await ContactAPI.create(
isFormData ? buildContactFormData(contactParams) : contactParams
);
AnalyticsHelper.track(CONTACTS_EVENTS.CREATE_CONTACT);
commit(types.SET_CONTACT_ITEM, response.data.payload.contact);
commit(types.SET_CONTACT_UI_FLAG, { isCreating: false });
} catch (error) {