4 ms·
If you're using JavaScript to add the pixel code, why not also include other metrics you can get easily with JS like screen resolution?
by amanzi 7y ago
If you're using JavaScript to add the pixel code, why not also include other metrics you can get easily with JS like screen resolution?
- benhoyt 7y agoYeah, good question. I wanted to do that, but GoAccess is a web server log parser and doesn't support custom fields (you don't get screen resolution via web logs, so it kinda makes sense). See: https://goaccess.io/man https://goaccess.io/man I could probably hack it and overload different HTTP status codes to mean different screen sizes or something, but I didn't consider device size to be important for me. GoAccess does break down the User-Agent into OS, so I can see mobile usage via the "iOS" and "Android" OS usage. Breakdown for my site: Windows 24%, iOS 22%, macOS 19%, Android 20%, Linux 11%, other 4%. So mobile usage is probably about 45%.
- amanzi 7y agoThanks - makes sense. Good work!
- NicoJuicy 7y agoAnd windows is only 50 % on desktop? Linux is 20%? Can you give a screenshot? These stats look way off to what I'm used to.
- jon-wood 7y agoIf you’re using JavaScript you could make a request in the background with a bunch of HTTP headers added like X-Screen-Resolution and then have your web server log them.