If you can reimplement GA in a few weeks, you need to do this over December, then enjoy your FU money.
GA is rather deep, with tons of integration and ways to slice and segment data.
Yeah, maybe in a few weeks you can get _something_ that'll give you something that'll make some manager not too unhappy. Seems like a terrible value prop for almost all companies since, unfortunately, approximately no one cares (or they run adblock anyways).
I mean implementing a analytics tool that does what you need. If you do it just for yourself, you don't need all those fancy things, so it is often doable in a few weeks.
If it takes you more than a few days to put together a basic analytics platform and reporting system, you're a script kiddie.
Not hard to track page hits, time on, time off, and arbitrary events.
EDIT:
Seriously? Folks, it's a table for analytics events, a few SQL queries to do basic reporting (at least in Postgres), a little bit of client-side JS to post the events, and a bit of server-side code to create the routes and maybe display the report page.
I guess if it doesn't include Kafka, Mesos, Kubermetes, Neo4j, and Docker, it isn't delivering business value.
It is quite costly to write to the database for each hit, I guess most downvotes is because of this. If you limit writes by keeping them in some memory cache it's doable for slightly higher loads.
You criticize people for _premature optimization_ while in the same breath advocating rolling your own, shitting implementation for page views? Right...
That maybe no option...