Updated event logging to track clicks.