But I don’t know the context of what you’re doing, so if you could explain this I might be able to make a better suggestion. Are you using a Webflow form or a custom 3rd party form?
I set up a goal for the metric. In order for the metrics system to read the goal achievement (the goal is to click a button), it is necessary to set a JavaScript event. Place the specified code in the button code line.
<input type = “submit” value = “Get advice” – This is the line after export. I need to put this code in between – onclick = “ym (12345678, ‘reachGoal’, ‘ready-btn-ru’); return true;”
The example you have is of using an inline JavaScript function within a submit input element. The only way to do this with Webflow (as far as I’m aware) is to use a custom code embed and write your own HTML form.
Another way to trigger a JavaScript function from a button click is to use JavaScript to attach a click event listener to it. This is what I showed in my example above.
Using the method I showed will not result in the HTML submit input element showing an “onclick” attribute.