M
M
Michael2020-03-05 13:51:18
JavaScript
Michael, 2020-03-05 13:51:18

How to connect Yandex Metrica goals to Bitrix web forms?

The site uses standard Bitrix web forms, with Ajax enabled. How to connect goals so that they are counted only on successful submission, and not on any click on the submit button?

The following structure is currently in use:

<form name="" onsubmit="ym(12345678, 'reachGoal', 'goal'); return true;">

But it works on any click, even if the form is not filled out or filled out incorrectly.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yaroslav Alexandrov, 2020-03-05
@alexyarik

For the form, use the onsubmit attribute
https://promo.altera-media.com/information/expert/...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question