add lead goal to fb
This commit is contained in:
parent
4e3150ef3c
commit
9fcc862743
@ -1,21 +1,21 @@
|
||||
import styles from "./styles.module.css";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useNavigate, useParams } from "react-router-dom";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import { actions, selectors } from "@/store";
|
||||
import {useEffect, useState} from "react";
|
||||
import {useNavigate, useParams} from "react-router-dom";
|
||||
import {useTranslation} from "react-i18next";
|
||||
import {useDispatch, useSelector} from "react-redux";
|
||||
import {actions, selectors} from "@/store";
|
||||
import Title from "../Title";
|
||||
import Policy from "../Policy";
|
||||
import EmailInput from "./EmailInput";
|
||||
import MainButton from "../MainButton";
|
||||
import Loader, { LoaderColor } from "../Loader";
|
||||
import Loader, {LoaderColor} from "../Loader";
|
||||
import routes from "@/routes";
|
||||
import NameInput from "./NameInput";
|
||||
import { useAuthentication } from "@/hooks/authentication/use-authentication";
|
||||
import { ESourceAuthorization } from "@/api/resources/User";
|
||||
import { EPlacementKeys, IPaywallProduct } from "@/api/resources/Paywall";
|
||||
import { usePaywall } from "@/hooks/paywall/usePaywall";
|
||||
import metricService, { EGoals } from "@/services/metric/metricService";
|
||||
import {useAuthentication} from "@/hooks/authentication/use-authentication";
|
||||
import {ESourceAuthorization} from "@/api/resources/User";
|
||||
import {EPlacementKeys, IPaywallProduct} from "@/api/resources/Paywall";
|
||||
import {usePaywall} from "@/hooks/paywall/usePaywall";
|
||||
import metricService, {EGoals, EMetrics} from "@/services/metric/metricService";
|
||||
|
||||
interface IEmailEnterPage {
|
||||
redirectUrl?: string;
|
||||
@ -89,7 +89,7 @@ function EmailEnterPage({
|
||||
|
||||
const handleClick = () => {
|
||||
authorize();
|
||||
metricService.reachGoal(EGoals.ENTERED_EMAIL);
|
||||
metricService.reachGoal(EGoals.ENTERED_EMAIL, [EMetrics.KLAVIYO, EMetrics.YANDEX, EMetrics.FACEBOOK]);
|
||||
};
|
||||
|
||||
const authorize = async () => {
|
||||
|
||||
@ -18,7 +18,7 @@ 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 } from "@/services/metric/metricService";
|
||||
import metricService, {EGoals, EMetrics} from "@/services/metric/metricService";
|
||||
import { ELottieKeys, useLottie } from "@/hooks/lottie/useLottie";
|
||||
|
||||
interface IEmailEnterPage {
|
||||
@ -99,7 +99,7 @@ function EmailEnterPage({
|
||||
|
||||
const handleClick = () => {
|
||||
authorize();
|
||||
metricService.reachGoal(EGoals.ENTERED_EMAIL);
|
||||
metricService.reachGoal(EGoals.ENTERED_EMAIL, [EMetrics.KLAVIYO, EMetrics.YANDEX, EMetrics.FACEBOOK]);
|
||||
};
|
||||
|
||||
const authorize = async () => {
|
||||
|
||||
@ -12,7 +12,7 @@ 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 } from "@/services/metric/metricService";
|
||||
import metricService, {EGoals, EMetrics} from "@/services/metric/metricService";
|
||||
import { ELottieKeys, useLottie } from "@/hooks/lottie/useLottie";
|
||||
import ButtonBack from "../../components/ButtonBack";
|
||||
import { Button } from "../../ui/Button";
|
||||
@ -100,7 +100,7 @@ function EmailEnterPage({
|
||||
|
||||
const handleClick = () => {
|
||||
authorize();
|
||||
metricService.reachGoal(EGoals.ENTERED_EMAIL);
|
||||
metricService.reachGoal(EGoals.ENTERED_EMAIL, [EMetrics.KLAVIYO, EMetrics.YANDEX, EMetrics.FACEBOOK]);
|
||||
};
|
||||
|
||||
const authorize = async () => {
|
||||
|
||||
@ -9,7 +9,7 @@ import Title from "@/components/Title";
|
||||
import Loader, { LoaderColor } from "@/components/Loader";
|
||||
import { useAuthentication } from "@/hooks/authentication/use-authentication";
|
||||
import { ESourceAuthorization } from "@/api/resources/User";
|
||||
import metricService, { EGoals } from "@/services/metric/metricService";
|
||||
import metricService, {EGoals, EMetrics} from "@/services/metric/metricService";
|
||||
|
||||
const emailRegex = /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/;
|
||||
|
||||
@ -44,7 +44,7 @@ export default function StepEmail() {
|
||||
|
||||
const authorize = async () => {
|
||||
await authorization(email, ESourceAuthorization["aura.palmistry"]);
|
||||
metricService.reachGoal(EGoals.ENTERED_EMAIL);
|
||||
metricService.reachGoal(EGoals.ENTERED_EMAIL, [EMetrics.KLAVIYO, EMetrics.YANDEX, EMetrics.FACEBOOK]);
|
||||
setIsAuth(true);
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user