I mean, I'm not making the argument that analytics are useless, but this seems like the worst possible example. You can do this trivially with a script to analyze your server (e.g. Apache) logs. And you don't need "a VPS with 1 GB of RAM" for that - which is four times the RAM of the VPS my personal website has run on for the last half decade.
This approach also uses no client-side javascript to collect data, so you wouldn't have to alarm users with potential privacy threats, because nothing is stored other than what's in the HTTP headers.