Piwik seems to be the most reasonable self-hosted option, though in my experience it's a bit high-maintenance.