How to track clicks

Unless you have a “religious” objection to share data with google then using GA is just the simplest and best way to go. Storing stats in your DB is a good start if you want to bring your server down when there is slightly high traffic, and in any case you can get all the stats that you want via the GA APIS.