<p>I have a winforms app and i want to keep track of every time a user clicks certain buttons, etc as well as other actions.  What is the best way for me to keep track of this information and then put it together so i can run metrics on most used features, etc.</p>

<p>This is a winforms app and I have users around the world.</p>

I'd try something like this:
```
```
// execute this method once all forms have been created
    public static void HookButtons()
    {
         foreach( Form f in Application.OpenForms )
         {
              EnumerateControls( f.Controls );
         }
    }

    public static void EnumerateControls( ICollection controls )
    {
        foreach( Control ctrl in controls )
        {
            if( ctrl.Controls.Count > 0 )
            {
                EnumerateControls( ctrl.Controls );
            }

            if( ctrl is ButtonBase )
            {
                ctrl.MouseClick +=new MouseEventHandler( ctrl_MouseClick );
            }
        }

    }

    static void ctrl_MouseClick( object sender, MouseEventArgs e )
    {
        ButtonBase clicked = ((ButtonBase)sender);

        // do something with the click information here
    }
```
```