Answer the question
In order to leave comments, you need to log in
Inserting the Yandex Metrics goal ID l Website on Bitrix?
Good afternoon experts and smart people!
Please tell me how the reachGoal metric identifier is inserted on the Bitrix website
For example:
There is a "Request a call" form and according to the Yandex instructions, you must write:
<form action="/" id="new_callback_form" onsubmit="yaCounterXXXXXX.reachGoal('CALL_BACK'); return true;” class=" new_callback_form"="">
<div class="submit">
<button onclick="button_callback('/bitrix/components/altop/callback', '[email protected]', 'NAME/TEL/TIME');" type="button" name="send_button" class="btn_buy popdef">Заказать</button>
</div>
...
<form action="/personal/cart/" method="post">
<button name="order" class="btn_buy popdef order" onclick="yaCounterXXXXXX.reachGoal('CHECKOUT'); return true;" value="Оформить заказ">Оформить заказ</button>
</form>
...
Answer the question
In order to leave comments, you need to log in
1) Tracking the addition to the cart is best hung in the addToCart function (somewhere in the java scripts of the template, like).
2) To track the order, it is best to hang on the "Order completed" page in this form:
<script>
yaCounterXXXXXX.reachGoal('CHECKOUT');
</script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question