result link event metrica
This commit is contained in:
parent
d32ca8dc3c
commit
1422ab9edd
@ -191,8 +191,7 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => {
|
|||||||
<Box
|
<Box
|
||||||
component={Link}
|
component={Link}
|
||||||
target={"_blank"}
|
target={"_blank"}
|
||||||
href={`https://${
|
href={`https://${window.location.hostname.includes("s") ? "s" : ""
|
||||||
window.location.hostname.includes("s") ? "s" : ""
|
|
||||||
}quiz.pena.digital/squiz/quiz/logo?q=${quizId}`}
|
}quiz.pena.digital/squiz/quiz/logo?q=${quizId}`}
|
||||||
sx={{
|
sx={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
@ -250,11 +249,16 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => {
|
|||||||
{settings.cfg.resultInfo.showResultForm === "after" &&
|
{settings.cfg.resultInfo.showResultForm === "after" &&
|
||||||
resultQuestion.content.redirect && (
|
resultQuestion.content.redirect && (
|
||||||
<Button
|
<Button
|
||||||
href={
|
onClick={() => {
|
||||||
resultQuestion.content.redirect.includes("https")
|
vkMetrics.resultLink();
|
||||||
|
yandexMetrics.resultLink();
|
||||||
|
setTimeout(() => {
|
||||||
|
location.href =
|
||||||
|
(resultQuestion.content.redirect.includes("https")
|
||||||
? resultQuestion.content.redirect
|
? resultQuestion.content.redirect
|
||||||
: `https://${resultQuestion.content.redirect}`
|
: `https://${resultQuestion.content.redirect}`).replace(/\s+/g, "");
|
||||||
}
|
}, 1000)
|
||||||
|
}}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
sx={{ p: "10px 20px", width: "auto", height: "50px" }}
|
sx={{ p: "10px 20px", width: "auto", height: "50px" }}
|
||||||
>
|
>
|
||||||
@ -264,6 +268,6 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => {
|
|||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box >
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -164,8 +164,7 @@ export const StartPageViewPublication = () => {
|
|||||||
<Box
|
<Box
|
||||||
component={Link}
|
component={Link}
|
||||||
target={"_blank"}
|
target={"_blank"}
|
||||||
href={`https://${
|
href={`https://${window.location.hostname.includes("s") ? "s" : ""
|
||||||
window.location.hostname.includes("s") ? "s" : ""
|
|
||||||
}quiz.pena.digital/squiz/quiz/logo?q=${quizId}`}
|
}quiz.pena.digital/squiz/quiz/logo?q=${quizId}`}
|
||||||
sx={{
|
sx={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
@ -224,11 +223,14 @@ export const StartPageViewPublication = () => {
|
|||||||
vkMetrics.emailOpened();
|
vkMetrics.emailOpened();
|
||||||
yandexMetrics.emailOpened();
|
yandexMetrics.emailOpened();
|
||||||
|
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
location.href = (
|
location.href = (
|
||||||
settings.cfg.info.site.includes("https")
|
settings.cfg.info.site.includes("https")
|
||||||
? settings.cfg.info.site
|
? settings.cfg.info.site
|
||||||
: `https://${settings.cfg.info.site}`
|
: `https://${settings.cfg.info.site}`
|
||||||
).replace(/\s+/g, "");
|
).replace(/\s+/g, "");
|
||||||
|
}, 1000)
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -34,6 +34,9 @@ export const useVkMetricsGoals = (vkId: number | undefined) => {
|
|||||||
// Посетитель увидел результат
|
// Посетитель увидел результат
|
||||||
resultShown: () =>
|
resultShown: () =>
|
||||||
sendMetrics(vkId, `penaquiz-finish`),
|
sendMetrics(vkId, `penaquiz-finish`),
|
||||||
|
// Посетитель нажал на ссылку в результате
|
||||||
|
resultLink: () =>
|
||||||
|
sendMetrics(vkId, `penaquiz-resultlink`),
|
||||||
// Посетитель дошёл до формы контактов
|
// Посетитель дошёл до формы контактов
|
||||||
contactsFormOpened: () => sendMetrics(vkId, "penaquiz-form"),
|
contactsFormOpened: () => sendMetrics(vkId, "penaquiz-form"),
|
||||||
// Посетитель заполнил форму контактов
|
// Посетитель заполнил форму контактов
|
||||||
|
@ -26,6 +26,9 @@ export const useYandexMetricsGoals = (id: number | undefined) => {
|
|||||||
// Посетитель увидел результат
|
// Посетитель увидел результат
|
||||||
resultShown: () =>
|
resultShown: () =>
|
||||||
sendMetrics(id, `penaquiz-finish`),
|
sendMetrics(id, `penaquiz-finish`),
|
||||||
|
// Посетитель нажал на ссылку в результате
|
||||||
|
resultLink: () =>
|
||||||
|
sendMetrics(id, `penaquiz-resultlink`),
|
||||||
// Посетитель дошёл до формы контактов
|
// Посетитель дошёл до формы контактов
|
||||||
contactsFormOpened: () => sendMetrics(id, "penaquiz-form"),
|
contactsFormOpened: () => sendMetrics(id, "penaquiz-form"),
|
||||||
// Посетитель заполнил форму контактов
|
// Посетитель заполнил форму контактов
|
||||||
|
Loading…
Reference in New Issue
Block a user