Problem with applying event handler (reachGoal) by Yandex.Metrika

Hello!

I’ve got an issue with applying custom attribute (onClick).
Does anybody know some workaround to make it happen.

It is important because it’s the only option how to track user statistics at reaching goals.

That’s what I need to add to form button.
onclick=“yaCounterCOUNTER_ID.reachGoal(‘TARGET_NAME’); return true;”

Some description from Yandex you can find here:
https://yandex.com/support/metrica/objects/reachgoal.xml

Thank you in advance!

Hi @GregoryShevchenko :smile:

the “Add Attribute” feature only works with “data-…” type attributes. If you need to add a special attribute, you can do so with jQuery in the custom code area.

For more information on this, please refer to this article: Custom code in head and body tags | Webflow University

Hope this helps

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.