diff --git a/src/components/PalmistryV1/pages/Email/index.tsx b/src/components/PalmistryV1/pages/Email/index.tsx index ef4372e..de1ab5b 100644 --- a/src/components/PalmistryV1/pages/Email/index.tsx +++ b/src/components/PalmistryV1/pages/Email/index.tsx @@ -59,6 +59,7 @@ function Email() { EMetrics.YANDEX, EMetrics.FACEBOOK, ]); + metricService.reachGoal(EGoals.ENTER_EMAIL_PALMISTRY, [EMetrics.YANDEX]); await authorization(email, ESourceAuthorization["aura.palmistry.new"]); }; diff --git a/src/components/PalmistryV1/pages/Payment/index.tsx b/src/components/PalmistryV1/pages/Payment/index.tsx index 950a84e..9558458 100644 --- a/src/components/PalmistryV1/pages/Payment/index.tsx +++ b/src/components/PalmistryV1/pages/Payment/index.tsx @@ -15,7 +15,10 @@ import routes from "@/routes"; import { addCurrency, ELocalesPlacement } from "@/locales"; import { useTranslations } from "@/hooks/translations"; import Stars from "../../components/Stars"; -import metricService, { EGoals } from "@/services/metric/metricService"; +import metricService, { + EGoals, + EMetrics, +} from "@/services/metric/metricService"; interface IPaymentContext { isShowPaymentModal: boolean; @@ -43,6 +46,9 @@ function Payment() { useEffect(() => { if (subscriptionStatus !== "subscribed") return; metricService.reachGoal(EGoals.PAYMENT_SUCCESS); + metricService.reachGoal(EGoals.PAYMENT_SUCCESS_PALMISTRY, [ + EMetrics.YANDEX, + ]); const timer = setTimeout(() => { navigate(routes.client.skipTrial()); }, 1500); diff --git a/src/components/palmistry/payment-screen/payment-screen.tsx b/src/components/palmistry/payment-screen/payment-screen.tsx index ffa3c07..a36f9f1 100644 --- a/src/components/palmistry/payment-screen/payment-screen.tsx +++ b/src/components/palmistry/payment-screen/payment-screen.tsx @@ -35,6 +35,9 @@ export default function PaymentScreen() { React.useEffect(() => { if (subscriptionStatus === "subscribed") { metricService.reachGoal(EGoals.PAYMENT_SUCCESS); + metricService.reachGoal(EGoals.PAYMENT_SUCCESS_PALMISTRY, [ + EMetrics.YANDEX, + ]); if (activeProductFromStore) { metricService.reachGoal(EGoals.PURCHASE, [EMetrics.FACEBOOK], { currency: "USD", diff --git a/src/components/palmistry/step-email/step-email.tsx b/src/components/palmistry/step-email/step-email.tsx index ebfab68..f425607 100644 --- a/src/components/palmistry/step-email/step-email.tsx +++ b/src/components/palmistry/step-email/step-email.tsx @@ -52,6 +52,7 @@ export default function StepEmail() { EMetrics.YANDEX, EMetrics.FACEBOOK, ]); + metricService.reachGoal(EGoals.ENTER_EMAIL_PALMISTRY, [EMetrics.YANDEX]); metricService.reachGoal(EGoals.LEAD, [EMetrics.FACEBOOK]); setIsAuth(true); }; diff --git a/src/services/metric/metricService.ts b/src/services/metric/metricService.ts index afa9612..47f903f 100644 --- a/src/services/metric/metricService.ts +++ b/src/services/metric/metricService.ts @@ -16,7 +16,9 @@ export enum EGoals { AURA_PAYMENT_METHODS_OPENED = "AuraPaymentMethodsOpened", AURA_SELECT_TRIAL = "AuraSelectTrial", AURA_TRIAL_CHOICE_PAGE_VISIT = "AuraTrialChoicePageVisit", - AURA_TRIAL_PAYMENT_PAGE_VISIT = "AuraTrialPaymentPageVisit" + AURA_TRIAL_PAYMENT_PAGE_VISIT = "AuraTrialPaymentPageVisit", + PAYMENT_SUCCESS_PALMISTRY = "PaymentSuccessPalmistry", + ENTER_EMAIL_PALMISTRY = "EnterEmailPalmistry" } export enum EFlags {