We value Open Source and make a point to release all our plugins on GitHub under a BSD License.
Install the WakaTime plugin from the SiYuan Marketplace.
Enter your API Key in the plugin settings panel.
Use SiYuan like you normally do and your activity will be displayed on your WakaTime Dashboard.