We value Open Source and make a point to release all our plugins on GitHub under a BSD License.
Install the wakatime python command line tool.
Create a ~/.wakatime.cfg file with contents:
api_key = XXXX
Replace XXXX with your actual API key
Mac and Linux
curl -fsSL https://raw.githubusercontent.com/wakatime/texstudio-wakatime/master/install.py | python
Download and extract texstudio-wakatime-master.zip, then double click install.py.
Use TeXstudio like you normally do and your time will be tracked for you automatically.
Visit https://wakatime.com/dashboard to see your coding activity.