Hacker News new | ask | show | jobs
by tastroder 2304 days ago
The user agent header is passed to whatever server your browser originally talks to, that server is free to do whatever it wants with the header (including forwarding it or storing it in logs that are analyzed somewhere at some point). Blocking on the client or even client network level has no effect on that. If you receive any content at all, there is a chance the UA header will be looked at.

But as others pointed out, the header will be rather meaningless in the foreseeable future anyway.

5 comments

Theoretically what you're saying is true, but practically speaking many websites are behind CDNs, like Cloudflare, Cloudfront or Akamai, with static content being cached aggressively to reduce costs and latency and it's pretty cheap and easy to do so nowadays, so most requests aren't even going to hit a backend.

You can work around this by installing a tracking pixel on every page you have, a pixel that always hits your backend, which can then generate a log line that can be analyzed. But this requires extra development and it's much easier to just install Google Analytics.

So I'm pretty sure that most browser stats are not coming from analyzing 1st party data that's logging the user agent.

And speaking from experience in this space, the error margin for such analytics is somewhere around 10% - 20%, which is roughly the percent of people having ad-blockers installed and this number is growing — you can extrapolate of course from those that don't have ad-blockers installed, but then you have a selection bias issue, because you're not talking about the same kind of user; e.g. people that use ad-blockers are the people that are more likely to be computer literate and capable of installing their own browser.

While you in turn are of course correct as well I wasn't trying to imply that every business out there is sitting in front of their server farm and analyzes httpd logs anymore.

With the prevalence of ads being served from the customer domain on larger sites these days I'd just think that enough parties have incentive enough to implement a tracking pixel or put a few lines of measurement protocol code somewhere to make sure that request data ends up in GA. But granted, I'm not in that space, the assumption that this data does not end up in the hands of some interested party for B2C sites just seemed weird, even in modern architectures.

Thanks for the error margin btw, that's far higher than I would have expected.

Tools like GA will be blocked by Firefox in tracking protection mode. They won't register a Firefox user.
But Google Analytics is typically (always?) done through JavaScript in the browser. And if the browser blocks any call to the Google analytics servers, Google won't know the user agent.
Sure, but most people don't analyze their server logs, they rely entirely on analytics, and if not done correctly (noscript tag) won't fire even a tracking pixel. Even then, most blockers will block those requests too.
The server is free to do anything with UA, but it doesn't, because google analyticts already takes care of that.