We value Open Source and make a point to release all our plugins on GitHub under a BSD License.
Download WakaTime for Mac.
Move WakaTime.app into your Applications folder, and run WakaTime.app.
If prompted, enter your API Key then click Save.
Use Safari like normal and your coding activity will be displayed on your WakaTime Dashboard.