Track Your Coding Productivity with WakaTime

Share this article

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.

Setup

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.

PhpStorm

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.

WakaTime

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.

Conclusion

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?

Frequently Asked Questions about Tracking Coding Productivity with WakaTime

How does WakaTime track my coding productivity?

WakaTime is a time tracking tool specifically designed for programmers. It works by integrating with your text editor or Integrated Development Environment (IDE) and tracking the time you spend actively coding. It can track the time spent on different projects, languages, and files, providing detailed reports and insights into your coding habits. This can help you understand where your time is going, identify bottlenecks, and improve your productivity.

Is WakaTime compatible with my preferred text editor or IDE?

WakaTime supports a wide range of text editors and IDEs. This includes popular options like Visual Studio, Atom, Sublime Text, and many more. You can check the full list of supported editors on the WakaTime website. If your preferred editor is not on the list, you can request support for it or use the WakaTime API to create your own plugin.

How does WakaTime handle privacy and data security?

WakaTime takes data security and privacy very seriously. All data is encrypted both in transit and at rest. Only you have access to your detailed data, and you can choose to share summary data with your team or keep it private. You can also delete your data at any time.

Can I use WakaTime for team projects?

Yes, WakaTime supports team projects. You can invite your team members to join your project and track their coding activity. This can help you understand how your team is spending their time, identify bottlenecks, and improve overall productivity.

What kind of reports and insights does WakaTime provide?

WakaTime provides a variety of reports and insights. This includes daily, weekly, and monthly summaries of your coding activity, breakdowns by project, language, and file, and detailed timelines of your coding sessions. You can also set goals and track your progress towards them.

Can I use WakaTime offline?

Yes, WakaTime can track your coding activity even when you’re offline. It will store the data locally and sync it with the server when you’re back online.

How do I install and set up WakaTime?

Installing and setting up WakaTime is easy. You just need to download and install the plugin for your text editor or IDE, then enter your API key. The API key links the plugin with your WakaTime account and allows it to track your coding activity.

Is WakaTime free to use?

WakaTime offers both free and paid plans. The free plan includes basic features like time tracking and summary reports. The paid plans offer additional features like detailed reports, goals, and team management.

Can I use WakaTime on multiple devices?

Yes, you can use WakaTime on multiple devices. Just install the plugin on each device and enter your API key. WakaTime will combine the data from all devices into a single report.

How can WakaTime help me improve my coding productivity?

WakaTime provides detailed insights into your coding habits, which can help you identify areas for improvement. For example, you might find that you’re spending too much time on certain tasks or that you’re most productive at certain times of the day. By understanding these patterns, you can make changes to your workflow and improve your productivity.

Peter NijssenPeter Nijssen
View Author

Peter is a software architect from the Netherlands. He freelanced for more then 6 years as a web developer, and meanwhile, he graduated as software engineer with honors. He decided to join CMNTY Corporation which specializes in creating community software and is now responsible for the ongoing development of multiple web applications as well as mobile applications. Peter believes a real developer is able to combine multiple techniques together to make sure the user receives the ultimate experience and enjoys using the application. In his free time, he loves to play board games with anyone who is interested. He especially has a passion for cooperative board games.

codeivatephpstormsublime texttime trackingtogglwakatime
Share this article
Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week
Loading form