Track Your Coding Productivity with WakaTime

By Peter Nijssen
We teamed up with SiteGround
To bring you the latest from the web and tried-and-true hosting, recommended for designers and developers. SitePoint Readers Get Up To 65% OFF Now

Back in June, I wrote an article about Codeivate, which is capable of tracking the language you are currently programming in, awarding points to your virtual profile in a manner similar to an RPG. One of the comments I received on that article was a link to a tool named WakaTime, which has similar capabilities. However, WakaTime is promoted as a time tracker, rather then a tool to measure your coding habits.

WakaTime records several things when you’re using your editor. First it records the absolute path of the file you are working in. This way, you can get a clear view of which files you have been working on in a certain time period. It also records the current time, what triggered the event and the current language syntax for the opened file. Next to that, it also tracks your current project and branch if possible, and the total number of lines for the current file.

These records are either stored locally until you are connected to the internet or on so called heartbeat events. Such a heartbeat is triggered in three different ways:

  • Every two minutes if you actively use the editor
  • When you switch between files
  • When you write something in a file

WakaTime can be integrated into an even bigger range of editors. From text editors like Sublime to IDE’s like XCode and PhpStorm. For this article, we’ll use the same editors as we have used in the Codeivate article: Sublime Text and PhpStorm. If you are interested in how to install WakaTime in any of the other editors, please take a look at this page.


The first thing to do is register yourself on WakaTime. Registration goes easy and smooth and there is no need to activate yourself. Fill in your email address and your password and you’re logged in immediately. WakaTime asks you directly which editor you want to use and you can click on your favorite editor to get started. You’ll need an API key which can be found on this page.

Sublime Text

Before you configure Sublime Text, make sure you’ve installed the package control. Open up package control and choose to install a package. Search for WakaTime and install the appropriate package.

As soon as Sublime is done installing the package, it’ll ask for your WakaTime API key at the bottom of your screen. After pressing enter, your Sublime editor has been configured.


Open PhpStorm and click file -> preferences. Within preferences, go to the plugin section and click browse repositories. Search for WakaTime and install the plugin that appears. When installed, PhpStorm will ask you to restart. Upon re-opening the app, a pop-up will appear and ask you for the API key of WakaTime. Fill in the API key you copied from the page above and paste it in the box. After you press enter, your PhpStorm editor has been configured.

The website

As soon as you change some files within your editor, you’ll notice on the WakaTime website that it’s recording your progress and logging data.

I already mentioned that WakaTime is more of a time tracking tool then a tool to track your coding habits. As we’ve seen, WakaTime also tracks your project name. This way it’s capable of tracking how much time you are spending on a certain project within your editor. It can even track how much time you spent on each file.

time tracker

Next to the time spent on a project, you can also see how much time you spent using a certain programming language. Clicking on a programming language will reveal which files you’ve changed. It’s nice to know how much time you spent on certain files, so you can roughly guess how much time it took to implement a certain feature, for example.


Comparing with Codeivate

WakaTime is more of a professional tool to track the time you’re spending on a certain project, with language tracking capabilities. Codeivate is more of a tool to track your languages, with some social elements added to it, like a leaderboard and ‘battles’.

This difference is reflected in the price: WakaTime costs you US $9 a month if you want to keep your history. If you stick to the free plan, your history will only last for seven days. Codeivate, on the other hand, is free to use.

WakaTime’s website is easier to understand and has a much better UX. The installation of the plugin itself is much easier then the one for Codeivate. However, in PhpStorm for example, you can see your actual status of Codeivate, while for WakaTime, you’ll need to open it’s website.

So if you’re more into the social aspect and you just want to roughly track which languages you’re using, Codeivate is what you’re looking for. If you want to track how much time you are spending on projects, WakaTime is definitely the way to go.

Comparing with Toggl

Log of a day's coding

Since WakaTime is more like a time tracker tool, it’s only fair to compare it with another time tracking service. Since we have a nice list of time trackers already covered in an other article, I decided to go with a different one named Toggl.

Toggl is more like a web based tool, because you do most of your work within your browser. Toggl is very easy to use. You just open it up in your favorite browser, pick a project and click the ‘start’ button. A timer starts to run and you can start working on the project. When you are finished, hit the stop button and the time you spent is recorded.

This is a fairly common process you will see in most time trackers. The advantage of this is that it also calculates the time you spent on answering emails, calling clients or testing your web application. In WakaTime, that time would be unrecorded. But an advantage of WakaTime is that, if you suddenly switch to a different project, it’ll automatically register time spent on that project, while with Toggl, you’ll have to stop recording and start a new session.

Toggl also allows you to add time manually, in case you forgot to click the start button or you were not near your computer.


I do like the idea behind WakaTime, but I see a problem as I already outlined in my comparison with Toggl: There is more time spent on a project then just the part where you work with the editor. You might have to plan visits or calls, you might need to send emails or test the application. WakaTime isn’t capable of tracking this time and there is no way to manually add some extra time. So in the end, you’ll still need to find another time tracker to track these tasks. I think if WakaTime could resolve this issue, the tool would be more usable. For me, however, I prefer the way Toggl works since I can track everything. At first, you might need to get used to it, but when it’s in your system, you’re recording everything.

What tools do you use to measure your coding productivity? Have you tried WakaTime or one of the other popular tools, and do you have any tips?

We teamed up with SiteGround
To bring you the latest from the web and tried-and-true hosting, recommended for designers and developers. SitePoint Readers Get Up To 65% OFF Now
  • Herminio Torres

    when you spend time in a terminal shell? for example I use a lot of the console rails, my time these tools are very poorly! interesting if it had a tracker for the shell

    • True indeed. That’s one of the “problems” I have with this kind of time trackers. It doesn’t track time spent in terminals, visits, phone calls, emails etc.

  • Correct me if I’m wrong but…

    1) There’s no evaluation of code quality.

    2) There’s no evaluation of if the code actual solved the problem it’s suppose to solve, in the best way possible.

    3) A monkey banging on the keyboard would fare pretty well.

    • You are correct. I do not assume it measures code quality or if the problem is solved. It does however checks how much time you spent on a certain project, so it can help you track your time. However, there are some caveats as I noted in the end.

      • Well, I guess if you’re using it for invoicing purposes it makes some sense.

        On the other hand, working more on something doesn’t dictate better outcomes, does it? What matters is not just the gross time but the net quality of the time. The (brain) science also says that time and distance (read: stepping back / away) can also help the brain find clarity.

        I think my point is, quantity is a very old (IT) metric and that myth needs to be busted already. I’m not so sure something like that helps to move us into 21st century.

  • Sebastian

    You shouldn’t miss!!

  • Francis Rausch

    What about Codealike? I believe it’s better than WakaTime.

    • Does codealike supports Sublime Text?

    • Perhaps you can explain why you think Codealike is better?

      If you solely look at the supported editors, they already start falling behind. Android and iOS got huge market shares in comparison with Windows Phone for example. However, only Visual Studio is being supported. So yeah, Windows (Phone) applications are supported, but every other OS is kinda missing. (Okay, Eclipse has Android support, but these days the intelij editor is the base)

      If I then look at which PHP editors are most popular from our recent survey ( again we only see Eclipse being listed in that list (since it’s the only PHP editor Codealike supports) and Eclipse only has a percentage lower then 5 in the survey.

      Perhaps the actual time tracking and dashboards of Codealike are much better, I cannot comment on that, but I can see that a lot of developers cannot use Codealike due to the very few supported editors.

      If I am wrong, please correct me :)

      • Francis Rausch

        Have you used Codealike and WakaTime on Visual Studio in order to compare both?

  • See my comment (currently) above :)

  • Sheraymond

    Thanks for sharing this nice tool though for better productivity I would suggest that there are so many other great apps as well. I used few good to use apps such as Harvest etc which had been good though had issues like downtime and speed etc. Again, I found this good to use app like Replicon time management software which has been really nice and could be quickly implemented in any office environment.

    It can be accessed from any location and has got lot of feasibility as well as great features as well that makes it a perfect tool for any business organization.

  • I haven’t. That’s why I am only comparing them based on editors they support in my previous comment. Like I said in my previous comment, feel free to comment why “codealike” is better. Just randomly seeing “A is better then B” is not helpful for anyone without an explanation :)