We announced yesterday that our team joined Google, and as a result we've open sourced pretty much our whole codebase. This also includes our in-app user analytics platform,
https://launchkit.io/users/ -- as well as the more popular web-based tools. An overview of how it works appears in the README as well as a how-to guide for easily spinning up an instance with Vagrant/Ansible.