diff --git a/lib/components/ViewPublicationPage/ResultForm.tsx b/lib/components/ViewPublicationPage/ResultForm.tsx index a3bbf6e..24dda2d 100644 --- a/lib/components/ViewPublicationPage/ResultForm.tsx +++ b/lib/components/ViewPublicationPage/ResultForm.tsx @@ -34,8 +34,10 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => { const yandexMetrics = useYandexMetricsGoals(settings.cfg.yandexMetricsNumber); useEffect(() => { - vkMetrics.resultShown(resultQuestion.id); - yandexMetrics.resultShown(resultQuestion.id); + vkMetrics.resultIdShown(resultQuestion.id); + yandexMetrics.resultIdShown(resultQuestion.id); + vkMetrics.resultShown(); + yandexMetrics.resultShown(); }, []); return ( diff --git a/lib/utils/hooks/metrics/useVkMetricsGoals.ts b/lib/utils/hooks/metrics/useVkMetricsGoals.ts index 53c34fa..4e49e94 100644 --- a/lib/utils/hooks/metrics/useVkMetricsGoals.ts +++ b/lib/utils/hooks/metrics/useVkMetricsGoals.ts @@ -29,8 +29,11 @@ export const useVkMetricsGoals = (vkId: number | undefined) => { // Посетитель кликнул по email на стартовой странице emailOpened: () => sendMetrics(vkId, "penaquiz-email"), // Посетитель увидел определенный результат (id - айдишник вопроса с типом result) - resultShown: (resultId: string) => + resultIdShown: (resultId: string) => sendMetrics(vkId, `penaquiz-result-${resultId}`), + // Посетитель увидел результат + resultShown: () => + sendMetrics(vkId, `penaquiz-finish`), // Посетитель дошёл до формы контактов contactsFormOpened: () => sendMetrics(vkId, "penaquiz-form"), // Посетитель заполнил форму контактов diff --git a/lib/utils/hooks/metrics/useYandexMetricsGoals.ts b/lib/utils/hooks/metrics/useYandexMetricsGoals.ts index 6ec5a35..a25e893 100644 --- a/lib/utils/hooks/metrics/useYandexMetricsGoals.ts +++ b/lib/utils/hooks/metrics/useYandexMetricsGoals.ts @@ -21,8 +21,11 @@ export const useYandexMetricsGoals = (id: number | undefined) => { // Посетитель кликнул по email на стартовой странице emailOpened: () => sendMetrics(id, "penaquiz-email"), // Посетитель увидел определенный результат (id - айдишник вопроса с типом result) - resultShown: (resultId: string) => + resultIdShown: (resultId: string) => sendMetrics(id, `penaquiz-result-${resultId}`), + // Посетитель увидел результат + resultShown: () => + sendMetrics(id, `penaquiz-finish`), // Посетитель дошёл до формы контактов contactsFormOpened: () => sendMetrics(id, "penaquiz-form"), // Посетитель заполнил форму контактов