4 ms·
If you think you can replicate that with 10 lines you have no idea what Google Analytics is used for.
by mateus1 7y ago
If you think you can replicate that with 10 lines you have no idea what Google Analytics is used for.
- freehunter 7y agoThose 10 lines probably depend on an npm package that relies on 100 other npm packages.
- anderspitman 7y agoI'm ashamed to admit that I use GA on my blog to essentially count page views. The other information is interesting but mostly unused (by me). I would be far better served by a tool or service handling server logs (any recommendations?). But GA is 0 friction, so it's what I picked up back in the day. I suspect there are a lot of people in this boat.
- allendoerfer 7y agoMatomo can also be used to analyze server logs.
- anderspitman 7y ago19USD/mo for 3 sites seems pretty steep, and I have 0 interest in managing my own PHP service. Is there anything cheaper in this space?
- projproj 7y agoJust a shot in the dark, but if you use Cloudflare already, their stats include view counts. It's also probably more accurate than relying on JS tracking tools because they can count the actual requests to your site.
- anderspitman 7y agoMy CloudFlare stats show multiple times as many hits as GA. I'm guessing it's not handling bots/spiders or something.
- TomGullen 7y agoWe put this down to people with JavaScript disabled or ad blockers. CF does filter bot traffic but will capture all hits as it’s tracking through network requests. For us it’s around a 35% increase in what GA reports.
- anderspitman 7y agoFor me CF is showing 3x GA unique visitors. Though that's almost all HN traffic, so I suppose it's certainly possible that 2/3 HN users have blockers.
- sam_goody 7y agoEven for page views, 10 lines of code won't replicate GA. Try counting how many hits, and you will find that all the bots and spiders quickly make the numbers meaningless. Of course, if that is all you are doing, you should be using Matamo or Fathom or whatever, but it is not fair to say GA could easily be replaced.
- xorcist 7y agoMany of the common web log analyzers are a bit long in the tooth. I've have used GoAccess for a while now and is mostly happy with it. It's fast enough and can generate pretty good looking static html which is mostly what you want for those simple use cases. A side effect of processing log files is that you can freely try software on historical data.
- anderspitman 7y agoDo you have a recommendation on log format for GoAccess? I run a lot of custom services with no nginx etc in front, so I'll have to figure out the logging myself.
- joshyi 7y agoYou can always create an issue on their github page, lots of help in there: https://github.com/allinurl/goaccess/issues https://github.com/allinurl/goaccess/issues