Poor man's analytics: events, client side, server side, whatever. Set up a separate DB with one big table, many columns for properties. One server call to write an event (a row), one ajax call to write from the client, throw it wherever you need. A bit of good old simple SQL for queries and reporting, and you are done.
I have a system exactly like this at my company, with a prettier UI on top of the SQL querying. I've been considering open sourcing it for a while; I wonder if there really is a demand for this, or if it's one of those things that everyone prefers to roll themselves.
But, seriously, everyone rolls this themselves and does it wrong. If you've done it right, and can release it, you'd be doing good for the world.