I'm new to Drupal and was hoping to find a way to attach an "onclick" event to the blog comment submit form button. I want to track how many times that button is clicked using Events in Google analytics. The problem is I can't find the button (or figure out how it gets generated) to be able to add the code. I have looked in admin as well as used FTP and searched the entire site for it.

Any help or ideas would be appreciated.

Thanks!

Comments

tom.camp’s picture

Well, you might want to look at hook_form_alter in the API. If you are not familiar with Drupal FormAPI, then take a look here.