K
K
Kilila2019-01-19 14:04:02
JavaScript
Kilila, 2019-01-19 14:04:02

"Successful Submission" one for two forms. How to set targets for two forms?

Good afternoon. There is one successful submission code (including a pop-up window) for two forms - a commercial request and a callback. You need to set up Yandex.metrics goals when sending data success. This, in fact, is the snag, you can’t mark out two goals with success. Because when sending in one of the forms, success will be recorded in the goal for the second one as well.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stepan Rodionov, 2019-01-19
@Kilila

I can offer a bad one, but the solution (considering the 1s-bitrix tag, I think it will do) is to set the event code for the metric in the data-attribute of the form, or in some hidden input, if you make the form header using standard tools. save it before sending it, and in success do ym(XXXXXX, 'reachGoal', savedTarget)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question