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:
parent
37c03ff239
commit
b35874e294
25 changed files with 441 additions and 120 deletions
|
|
@ -72,7 +72,7 @@ export const CreateWorkspaceForm: FC<Props> = observer((props) => {
|
|||
.createWorkspace(formData)
|
||||
.then(async (res) => {
|
||||
postHogEventTracker(
|
||||
"WORKSPACE_CREATE",
|
||||
"WORKSPACE_CREATED",
|
||||
{
|
||||
...res,
|
||||
state: "SUCCESS"
|
||||
|
|
@ -94,7 +94,7 @@ export const CreateWorkspaceForm: FC<Props> = observer((props) => {
|
|||
message: "Workspace could not be created. Please try again.",
|
||||
})
|
||||
postHogEventTracker(
|
||||
"WORKSPACE_CREATE",
|
||||
"WORKSPACE_CREATED",
|
||||
{
|
||||
state: "FAILED"
|
||||
},
|
||||
|
|
@ -110,7 +110,7 @@ export const CreateWorkspaceForm: FC<Props> = observer((props) => {
|
|||
message: "Some error occurred while creating workspace. Please try again.",
|
||||
});
|
||||
postHogEventTracker(
|
||||
"WORKSPACE_CREATE",
|
||||
"WORKSPACE_CREATED",
|
||||
{
|
||||
state: "FAILED"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ export const DeleteWorkspaceModal: React.FC<Props> = observer((props) => {
|
|||
.then((res) => {
|
||||
handleClose();
|
||||
router.push("/");
|
||||
postHogEventTracker("WORKSPACE_DELETE", {
|
||||
postHogEventTracker("WORKSPACE_DELETED", {
|
||||
res,
|
||||
state: "SUCCESS",
|
||||
});
|
||||
|
|
@ -79,7 +79,7 @@ export const DeleteWorkspaceModal: React.FC<Props> = observer((props) => {
|
|||
title: "Error!",
|
||||
message: "Something went wrong. Please try again later.",
|
||||
});
|
||||
postHogEventTracker("WORKSPACE_DELETE", {
|
||||
postHogEventTracker("WORKSPACE_DELETED", {
|
||||
state: "FAILED",
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ export const WorkspaceDetails: FC = observer(() => {
|
|||
|
||||
await updateWorkspace(currentWorkspace.slug, payload)
|
||||
.then((res) => {
|
||||
postHogEventTracker("WORKSPACE_UPDATE", {
|
||||
postHogEventTracker("WORKSPACE_UPDATED", {
|
||||
...res,
|
||||
state: "SUCCESS",
|
||||
});
|
||||
|
|
@ -78,7 +78,7 @@ export const WorkspaceDetails: FC = observer(() => {
|
|||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
postHogEventTracker("WORKSPACE_UPDATE", {
|
||||
postHogEventTracker("WORKSPACE_UPDATED", {
|
||||
state: "FAILED",
|
||||
});
|
||||
console.error(err);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue