chore: posthog event for workspace invite (#2989)

* chore: posthog event for workspace invite

* chore: updated event names, added all the existing events to workspace metrics group

* chore: seperated workspace invite

* fix: workspace invite accept event updated

---------

Co-authored-by: Ramesh Kumar Chandra <rameshkumar2299@gmail.com>
This commit is contained in:
Bavisetti Narayan 2023-12-06 17:15:14 +05:30 committed by sriram veeraghanta
parent 37c03ff239
commit b35874e294
25 changed files with 441 additions and 120 deletions

View file

@ -41,7 +41,7 @@ const WorkspaceMembersSettingsPage: NextPageWithLayout = observer(() => {
return inviteMembersToWorkspace(workspaceSlug.toString(), data)
.then(async (res) => {
setInviteModal(false);
postHogEventTracker("WORKSPACE_USER_INVITE", { ...res, state: "SUCCESS" });
postHogEventTracker("MEMBER_INVITED", { ...res, state: "SUCCESS" });
setToastAlert({
type: "success",
title: "Success!",
@ -49,7 +49,7 @@ const WorkspaceMembersSettingsPage: NextPageWithLayout = observer(() => {
});
})
.catch((err) => {
postHogEventTracker("WORKSPACE_USER_INVITE", { state: "FAILED" });
postHogEventTracker("MEMBER_INVITED", { state: "FAILED" });
setToastAlert({
type: "error",
title: "Error!",