The WakaTime plugin for SQL Server Management Studio is open-source on GitHub.
Download WakaTime.dll, Nlog.dll and Nlog.config.
Inside regedit.exe go to HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\11.0_Config\AutomationOptions\LookInFolders.
Copy WakaTime.Addin to one of those folders. I recommend copying into C:\Users\.
Edit WakaTime.Addin and change the node Extensibility/Addin/Assembly to the full path of WakaTime.dll you downloaded.
Right click on WakaTime.dll and select Unblock.
Into Nlog.config file you must change two nodes as described below:
Change the node nlog/targets/target/fileName to the path you want to save logs.
Change the node nlog/targets/target/archiveFileName to the path you want to archive logs.
Restart SQL Server Management Studio.
Enter your API key , then press enter.
Use SQL Server Management Studio like you normally do and your time will be tracked for you automatically.
Visit https://wakatime.com/dashboard to see your logged time.