I have a moderate experience with Ruby on Rails, PHP, SQL an NoSQL databases and CoffeeScript.
I want to build a web analytics tool for people in my country for their local websites, that will also have a main page of top site ranks.
In the beginning I am not asking out of myself to have something as powerful as Piwik or GA, but I want to make a good start. I know I will have to use JavaScript, that is good, I will also need a server-side processing part, but I don't know how to efficiently put these parts together.
I would love to hear about a book about such topic, but I don't think there is one. If possible, please recommend materials and subjects I need to master to make out my plan. Maybe some aids that can help me too.
Why not go through how Piwik use its tracker? It is open-source, so all sources are available. Might be a good place to start! Piwik github