Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Build Status

Activity Tracker

This is proof-of-concept plugin for IntelliJ IDEs to track and record user activity. Currently, the main feature is recording user activity into csv files.

To install the plugin use IDE Settings -> Plugins -> Marketplace -> Search for "Activity Tracker".

To use the plugin see "Activity tracker" widget in IDE statusbar.



The main idea is to mine recorded data for interesting user or project-specific insights, e.g. time spent in each part of project or editing/browsing ratio. Especially it might be interesting to try some unsupervised machine learning on it. If you happen to use the plugin and find interesting ways to analyze data, feel free to get in touch on twitter or GitHub.


To open plugin popup menu:

  • click on "Activity tracker" widget in IDE statusbar or
  • invoke "Activity Tracker Popup" action (ctrl+alt+shift+O shortcut)

Popup menu actions

  • Start/Stop Tracking - activate/deactivate recording of IDE events. Events are written into ide-events.csv file located in predefined path. This file is referred to as "current log".
  • Current Log
    • Show Stats - analyse current log and open toolwindow which shows time spent editing each file. There are plans to add more types of analysis, but currently that's all there is to it. You're more than welcome to suggest analysis or send some code.
    • Open in IDE - open current log file in IDE editor.
    • Open in File Manager - open current lof in file manager (can be useful to navigate to log file location path).
    • Roll Tracking Log - rename current log file by adding date postfix to it. The intention is to keep previous data and clear current log.
    • Clear Tracking Log - remove all data from current log.
  • Settings
    • Track IDE Action - enable capturing IDE actions.
    • Poll IDE State - enable polling IDE state (every 1 second) even if there is no activity. Enable this option to get more accurate data about time spent in/outside of IDE.
    • Track Keyboard - enable tracking keyboard events. Beware! If you enter sensitive information (like passwords), it might be captured and stored in current log file.
    • Track Mouse - enable tracking mouse click events. Note that because of high volume of mouse move and wheel events, they are logged at most every 250 milliseconds.

Log file format

The event log file is written as csv RFC4180 in UTF-8 encoding.

  • timestamp - time of event in yyyy-MM-dd'T'HHmmss.SSSZ format (see createDateTimePrintFormat() method). In plugin version 0.1.3 it was ISO-8601 extended format. In plugin version 0.1.2 it was yyyy/MM/dd kk:mm:ss.SSS format.
  • user name - current user name. The intention is to be able to merge logs from several users.
  • event type, event data - content depends on type of captured event.
    • IDE actions: event type = Action, event data = [action id] (e.g. Action,EditorUp); or event type = VcsAction, event data = [Push|Update|Commit]; or event type = CompilationFinished, event data = [amount of errors during compilation].

    • Executions: event type = Execution, event data = [Run|Debug|Coverage]:[Run configuration name]:[full commandline instruction].

    • IDE polling events: event type = IdeState, event data = [Active|Inactive|NoProject], where Inactive means IDE doesn't have focus, NoProject mean all projects are closed.

    • keyboard events: event type = KeyEvent, event data = [eventId]:[keyChar]:[keyCode]:[modifiers] (see AWT KeyEvent).

    • mouse events: event type = MouseEvent, event data can be

      • click:[button]:[clickCount]:[modifiers]
      • move:[x]:[y]:[modifiers]
      • wheel:[wheelRotation]:[wheelModifiers]

      (see java MouseEvent and MouseWheelEvent for details).

  • project name - name of active project.
  • focused component - can be Editor, Dialog, Popup or toolwindow id (e.g. Version Control or Project).
  • current file - absolute path to file open in editor (even when editor has no focus).
  • PSI path - PSI path to currently selected element, format [parent]::[child]. Empty value if file was not parsed by IDE (e.g. plain text file).
  • editor line - caret line number in Editor.
  • editor column - caret column number in Editor.
  • task/change list name - name of the current task (Main Menu -> Tools -> Tasks & Contexts) or current VCS change list name if "Task Management" plugin is not installed.

Example of log file


How to use log file?

This is up to you. The main purpose of this plugin is to record data. It's similar to collecting IDE statistics usage (which you might be sending to JetBrains) except that you own the data.


The most interesting thing is analysis of recorded data. All suggestions and code are welcome (even if it's not a JVM language, e.g. a python snippet). If you have a question, feel free to create an issue.

Working on the plugin:

  • to edit code, open project in IJ IDEA importing gradle configuration
  • to build use ./gradlew buildPlugin task which will create build/distributions/ files
  • to run use ./gradlew runIde task
  • alternatively, you can use LivePlugin as an entry point for this plugin code.