What would be the best way to collect usage metrics of a SaaS software?
I want to collect something like logins, clicks and time spent in my software.
Are there existing services out there that allow such data collection? Or would you advise to write our own custom data analysis?
Google analytics is a pretty standard approach. Just a small bit of javascript on your web pages. http://www.google.com/analytics/ Also has features to help you track usage against marketing campaigns.
If you are writing the code to your saas application(s) I don't see why you wouldn't write your own over time.
Start off with simple data provided by google - but that will probably be limited to page views - and likely won't be able to tell you more detailed information only available from your database and other servers.
Here is a list of possibilities: