The open source plugin for productivity metrics, goals, leaderboards, and automatic time tracking.
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.