Answer the question
In order to leave comments, you need to log in
How to correctly insert google attribute js?
How to add google tracking code to button?
google writes like this
Как добавить код в кнопку. Здесь показано, как настроить отслеживание нажатий кнопки с помощью тега <button>. Подставьте вместо "http://example.com/your-link" URL своего сайта.
<button onclick="return gtag_report_conversion('http://example.com/your-link')">Отправить</button>
<button type="button" onclick="cart.add('<?php echo $product['product_id']; ?>');"><?php echo $button_cart; ?></button>
Answer the question
In order to leave comments, you need to log in
So add this function inside cart.add
After this line:
https://github.com/opencart/opencart/blob/8b4144ed...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question