I didn't down vote you becauise it seems like you tried to answer genuinely but your comment is dismissive and doesn't add value to the actual question about Google analytics alternative. It sounds more like "just use logs"
Parsing logs is not as simple as adding an analytics script and will require a lot of technical work. Not everyone would want to do that and it doesn't directly answer the question apples to apples.