{!isLoading && (
diff --git a/src/components/PalmistryV1/pages/TrialPayment/index.tsx b/src/components/PalmistryV1/pages/TrialPayment/index.tsx
index fa430fc..5df25d0 100644
--- a/src/components/PalmistryV1/pages/TrialPayment/index.tsx
+++ b/src/components/PalmistryV1/pages/TrialPayment/index.tsx
@@ -15,6 +15,8 @@ import { useTranslations } from "@/hooks/translations";
import { ELocalesPlacement } from "@/locales";
import { usePreloadImages } from "@/hooks/preload/images";
import useTimer from "@/hooks/palmistry/use-timer";
+import { useEffect } from "react";
+import metricService, { EGoals, EMetrics } from "@/services/metric/metricService";
function TrialPayment() {
const { translate } = useTranslations(ELocalesPlacement.PalmistryV1);
@@ -28,6 +30,11 @@ function TrialPayment() {
navigate(routes.client.palmistryV1Payment());
};
+ useEffect(() => {
+ metricService.reachGoal(EGoals.TRIAL_PAYMENT_PAGE_VISIT, [EMetrics.YANDEX, EMetrics.KLAVIYO]);
+ metricService.reachGoal(EGoals.AURA_TRIAL_PAYMENT_PAGE_VISIT, [EMetrics.KLAVIYO]);
+ }, []);
+
return (
<>
diff --git a/src/components/Payment/nmi/CheckoutForm/index.tsx b/src/components/Payment/nmi/CheckoutForm/index.tsx
index 1386b10..81c9a5f 100644
--- a/src/components/Payment/nmi/CheckoutForm/index.tsx
+++ b/src/components/Payment/nmi/CheckoutForm/index.tsx
@@ -48,7 +48,7 @@ export default function CheckoutForm({
onError(error);
}
- }, [error, onError]);
+ }, [error]);
useEffect(() => {
if (isModalClosed && onModalClosed) {
@@ -60,7 +60,7 @@ export default function CheckoutForm({
if (isPaymentSuccess && onSuccess) {
onSuccess();
}
- }, [isPaymentSuccess, onSuccess]);
+ }, [isPaymentSuccess]);
const handleSubmit = (e: React.FormEvent
| React.MouseEvent) => {
e.preventDefault();
diff --git a/src/components/PaymentPage/results/SuccessPage/index.tsx b/src/components/PaymentPage/results/SuccessPage/index.tsx
index f9c1dca..e6ad6d6 100644
--- a/src/components/PaymentPage/results/SuccessPage/index.tsx
+++ b/src/components/PaymentPage/results/SuccessPage/index.tsx
@@ -7,10 +7,6 @@ import MainButton from "@/components/MainButton";
import { useDispatch, useSelector } from "react-redux";
import { actions, selectors } from "@/store";
import { useEffect } from "react";
-import metricService, {
- EGoals,
- EMetrics,
-} from "@/services/metric/metricService";
import { ELocalesPlacement } from "@/locales";
function PaymentSuccessPage(): JSX.Element {
@@ -25,11 +21,11 @@ function PaymentSuccessPage(): JSX.Element {
};
useEffect(() => {
- metricService.reachGoal(EGoals.PAYMENT_SUCCESS);
- metricService.reachGoal(EGoals.PURCHASE, [EMetrics.FACEBOOK], {
- currency: "USD",
- value: ((currentProduct?.trialPrice || 100) / 100).toFixed(2),
- });
+ // metricService.reachGoal(EGoals.PAYMENT_SUCCESS);
+ // metricService.reachGoal(EGoals.PURCHASE, [EMetrics.FACEBOOK], {
+ // currency: "USD",
+ // value: ((currentProduct?.trialPrice || 100) / 100).toFixed(2),
+ // });
}, [currentProduct?.trialPrice]);
return (
diff --git a/src/components/pages/ABDesign/v1/pages/EmailEnterPage/index.tsx b/src/components/pages/ABDesign/v1/pages/EmailEnterPage/index.tsx
index 38fe7f9..57fb54e 100644
--- a/src/components/pages/ABDesign/v1/pages/EmailEnterPage/index.tsx
+++ b/src/components/pages/ABDesign/v1/pages/EmailEnterPage/index.tsx
@@ -18,10 +18,6 @@ import { ESourceAuthorization } from "@/api/resources/User";
import { useAuthentication } from "@/hooks/authentication/use-authentication";
import { usePaywall } from "@/hooks/paywall/usePaywall";
import { EPlacementKeys, IPaywallProduct } from "@/api/resources/Paywall";
-import metricService, {
- EGoals,
- EMetrics,
-} from "@/services/metric/metricService";
import { ELottieKeys, useLottie } from "@/hooks/lottie/useLottie";
import { ELocalesPlacement } from "@/locales";
import { useSession } from "@/hooks/session/useSession";
@@ -116,11 +112,11 @@ function EmailEnterPage({
);
}
authorize();
- metricService.reachGoal(EGoals.ENTERED_EMAIL, [
- EMetrics.KLAVIYO,
- EMetrics.YANDEX,
- EMetrics.FACEBOOK,
- ]);
+ // metricService.reachGoal(EGoals.ENTERED_EMAIL, [
+ // EMetrics.KLAVIYO,
+ // EMetrics.YANDEX,
+ // EMetrics.FACEBOOK,
+ // ]);
};
const authorize = async () => {
diff --git a/src/components/pages/ABDesign/v1/pages/Onboarding/index.tsx b/src/components/pages/ABDesign/v1/pages/Onboarding/index.tsx
index 1ea6267..f778fa0 100644
--- a/src/components/pages/ABDesign/v1/pages/Onboarding/index.tsx
+++ b/src/components/pages/ABDesign/v1/pages/Onboarding/index.tsx
@@ -12,6 +12,7 @@ import { useSelector } from "react-redux";
import { selectors } from "@/store";
import metricService, {
EGoals,
+ EMetrics,
useMetricABFlags,
} from "@/services/metric/metricService";
import { useTranslations } from "@/hooks/translations";
@@ -44,6 +45,9 @@ function OnboardingPage() {
const path = searchParams.get("path");
const handleNext = useCallback(() => {
+ if (path === "compatibility") {
+ return navigate(routes.client.home());
+ }
if (path === "palmistry") {
return navigate(routes.client.home());
}
@@ -98,8 +102,9 @@ function OnboardingPage() {
useEffect(() => {
progressInterval.current = setInterval(() => {
setProgress((prev) => {
- if (prev === 99 && generatingVideo)
- [metricService.reachGoal(EGoals.ROSE_LOADING_END)];
+ if (prev === 99 && generatingVideo) {
+ metricService.reachGoal(EGoals.ROSE_LOADING_END, [EMetrics.YANDEX, EMetrics.KLAVIYO]);
+ };
if (prev >= 100) return prev;
return prev + 1;
});
@@ -110,7 +115,7 @@ function OnboardingPage() {
}, [generatingVideo, getProgressIntervalTiming]);
useEffect(() => {
- metricService.reachGoal(EGoals.ROSE_LOADING_START);
+ metricService.reachGoal(EGoals.ROSE_LOADING_START, [EMetrics.YANDEX, EMetrics.KLAVIYO]);
}, []);
return (
@@ -127,9 +132,8 @@ function OnboardingPage() {
)}