I was looking for another way to track if a button was clicked. I found a way to create a log file but also read about how to track an event in Google Analytics. I found Google’s guide on Event Tracking. It mentioned to call the _trackEvent () method which seemed straightforward. The guide explained the parameters which included the required category and action and the option label, value and non-interaction. However, the code example was for a hyperlink and not a ASP.NET button.
So, I did additional research. I found an article for Google Analytic help related to button in ASP.NET. The article showed how to use the OnClientClick parameter. So long at the Google Analytics code was on the page or in the MasterPage, the OnClientClick parameter worked. I then fine-tuned the category, action and label parameters to organize the event tracking in my Google Analytics account.