feat: event tracking using posthog and created application provider to render multiple wrappers (#2757)
* fix: event tracker changes * fix: App provider implementation using wrappers * fix: updating packages * fix: handling warning * fix: wrapper fixes and minor optimization changes * fix: chore app-provider clearnup * fix: cleanup * fix: removing jitsu tracking * fix: minor updates * fix: adding event to posthog event tracker (#2802) * dev: posthog event tracker update intitiate * fix: adding events for posthog integration * fix: event payload --------- Co-authored-by: Ramesh Kumar Chandra <31303617+rameshkumarchandra@users.noreply.github.com>
This commit is contained in:
parent
33be52792f
commit
78fee22fec
114 changed files with 825 additions and 2768 deletions
|
|
@ -18,6 +18,7 @@ import type { IState } from "types";
|
|||
import { STATES_LIST } from "constants/fetch-keys";
|
||||
// constants
|
||||
import { GROUP_CHOICES } from "constants/project";
|
||||
import { trackEvent } from "helpers/event-tracker.helper";
|
||||
|
||||
type Props = {
|
||||
data: IState | null;
|
||||
|
|
@ -87,8 +88,12 @@ export const CreateUpdateStateInline: React.FC<Props> = observer((props) => {
|
|||
|
||||
await projectStateStore
|
||||
.createState(workspaceSlug.toString(), projectId.toString(), formData)
|
||||
.then(() => {
|
||||
.then((res) => {
|
||||
handleClose();
|
||||
trackEvent(
|
||||
'STATE_CREATE',
|
||||
res
|
||||
)
|
||||
setToastAlert({
|
||||
type: "success",
|
||||
title: "Success!",
|
||||
|
|
@ -116,10 +121,13 @@ export const CreateUpdateStateInline: React.FC<Props> = observer((props) => {
|
|||
|
||||
await projectStateStore
|
||||
.updateState(workspaceSlug.toString(), projectId.toString(), data.id, formData)
|
||||
.then(() => {
|
||||
.then((res) => {
|
||||
mutate(STATES_LIST(projectId.toString()));
|
||||
handleClose();
|
||||
|
||||
trackEvent(
|
||||
'STATE_UPDATE',
|
||||
res
|
||||
)
|
||||
setToastAlert({
|
||||
type: "success",
|
||||
title: "Success!",
|
||||
|
|
@ -161,9 +169,8 @@ export const CreateUpdateStateInline: React.FC<Props> = observer((props) => {
|
|||
{({ open }) => (
|
||||
<>
|
||||
<Popover.Button
|
||||
className={`group inline-flex items-center text-base font-medium focus:outline-none ${
|
||||
open ? "text-custom-text-100" : "text-custom-text-200"
|
||||
}`}
|
||||
className={`group inline-flex items-center text-base font-medium focus:outline-none ${open ? "text-custom-text-100" : "text-custom-text-200"
|
||||
}`}
|
||||
>
|
||||
{watch("color") && watch("color") !== "" && (
|
||||
<span
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import useToast from "hooks/use-toast";
|
|||
import { Button } from "@plane/ui";
|
||||
// types
|
||||
import type { IState } from "types";
|
||||
import { trackEvent } from "helpers/event-tracker.helper";
|
||||
|
||||
type Props = {
|
||||
isOpen: boolean;
|
||||
|
|
@ -47,7 +48,10 @@ export const DeleteStateModal: React.FC<Props> = observer((props) => {
|
|||
|
||||
await projectStateStore
|
||||
.deleteState(workspaceSlug.toString(), data.project, data.id)
|
||||
.then(() => {
|
||||
.then((res) => {
|
||||
trackEvent(
|
||||
'STATE_DELETE',
|
||||
)
|
||||
handleClose();
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue