In this paper, we describe a novel methodology that integrates the design of the (i) user interface; (ii) interaction logger; and (iii) log analyzer. It is based on formalizing, via UML state diagrams, the functionality that is supported by an interactive system, deriving XML schemas for capturing the interactions in activity logs and deriving log parsers that reveal the system states and the state transitions that took place during the interaction. Subsequent analysis of state activities and state transitions captured in the logs can be used to study the usersystem interaction or to test some research hypothesis. While this approach is rather general and can be applied in studying a variety of interactive systems, it has been devised and applied in research work on exploratory information retrieval, where the focus is on studying the interaction and on finding interaction patterns.