How to add custom onclick tag to form submit button

Hi there,

For Google Analytics I need to add an onlick variable/tag to the form submit button but haven’t found a straight forward solution.
html should result in something like this:

Should I use the Interaction tab and set it like this (screenshot): Screenshot by Lightshot
so that upon form submit an attribute “onclick” is set with the desired value?

Thanks in advance for any help!