Hello everyone, please tell me how to insert an attribute for forms Where you need to insert, tried to write to input submit, displays an error. I tried to insert via onclick and without onclick anyway error

on_sent_ok: "ga ('send', 'event', 'zayavka', 'zakazat')

Thank you in advance.

    1 answer 1

    Category zayavka Ekshin zakazat

     <input type="submit" value="Отправить" name="form[Submit]" onClick="ga('send', 'event', { eventCategory: 'zayavka', eventAction: 'zakazat'})"> 

    For contact forms 7

     on_sent_ok: "ga('send', 'event', { eventCategory: 'zayavka', eventAction: 'zakazat'});" 
    • Please tell me why then on_sent_ok is needed: ahead? Is this for php? - Dos771
    • It should work with on_sent_ok too, I wrote in the answer how it can be used - L. Vadim