1. I would rename the pixel.png to something like image.png. Never call your script anything like tracking, analytics, or pixel when you don't want to be blocked by ad blockers. We use hello.js and hello.gif. [1] > Log file parsing is an old-skool but effective way of measuring the traffic to your site. 2. By using a pixel image you can bypass caching. When using server logs without the image you only get the non cached requests. So an image like you use is a better approach. 3. Your image is being cached. So if somebody revisits your website your image will not be loaded and you will not find anything in your logs. Just disable your etag and add a expiry date of the past. Awesome that more and more people are replacing Google Analytics with more simple tools. GA is overly complicated and has not the best privacy mindset. I built Simple Analytics [2] as a privacy friendly alternative. [1] https://docs.simpleanalytics.com/script [2] https://simpleanalytics.com
If your business is to track people, yes. If it's to gather statistics without tracking people (like page views), I think it perfectly fine to bypass ad blockers. We even have a dedicated feature for bypassing ad blockers [1] because we think page views are not privacy invasive. We drop IP addresses from every request so there is no personal data in our database or logs.
If you really want to block you can enable the Do Not Track setting. Although I think this should only be used when you are actually tracking people (we don't). So this feature might be removed in the future. It's already removed by Safari because it is another parameter to fingerprint a browser. [1] https://docs.simpleanalytics.com/bypass-ad-blockers
The privacy game is about power, not about who is doing what right now. People shun Google's data collection because of what Google can do with the data, not what it has done or is doing; it only takes a single case of data misuse to reveal the power dynamics even if nothing has happened to them personally.
You don't have to play the privacy game -- there is a lot of space between really respecting user's privacy and breaking privacy laws. But if you do, you should put the power back in the user's hand. (Disclaimer: I work for Google.)
I completely agree. I don't think Do not Track was ever about knowing how many visitors you have or the browser they use. That's basic knowledge needed to improve the site. Tracking becomes an issue if it's shared across pages and where personal data is collected without consent to sell it to the highest bidder.
I don't think what you're doing is the end of the world, but answer this is extremely patronizing.
You've basically said you know some users block your stuff, but you think they probably shouldn't really want to block your stuff, so you devise an end run around them. Then, finally, you conclude that if they really want to block your stuff, they should do something that you yourself admit won't block your stuff, but that's okay because they shouldn't want to block your stuff.
The author said it himself, he could have just put Cloudfront in front of Pages and parsed the access logs there. The referrer and user-agent, which are sent by the browser, are in the request headers. There would be no need for JS or an image if the website owner just changed their setup.
No. This is self-hosted analytics, no 3rd-party involved, the way it's supposed to be. Tracking involves a 3rd-party. Be it Google Analytics or Cambridge Analytica UserTracking (TM).
Not at the moment. We will implement tracking user flow with in a privacy minded way. I asked Hacker News a while ago if they would think it was privacy friendly [1]
To be clear about the other thread about bypassing ad blockers. We will not have this feature when tracking user flow. People should have the right to block events if they want. But for basic info as in page views we keep offering the ad blocker bypass feature. [1] https://news.ycombinator.com/item?id=19136044
> Obviously with log parsing you don’t get as much information as a JavaScript-heavy, Google Analytics-style system. There’s no screen sizes, no time-on-page metrics, etc. But that’s okay for me!
This also bypasses Ad blocker. In the case you have a large percentage of technical audience (who presumably would have Ad blocker installed) this log can be way more accurate than GA. However this still requires setting up the image on a third-party server. I would really love it if GitHub pages or Netlify can provide some simple server-side tracking. It doesn't match GA but in some cases that's all I need.
> I would really love it if GitHub pages or Netlify can provide some simple server-side tracking. It doesn't match GA but in some cases that's all I need.
They already owned an analytics service for a while but it changed owners recently. Still looks almost the same though https://get.gaug.es/ - so I guess they decided it’s not part of their core business.
> I would really love it if GitHub pages or Netlify can provide some simple server-side tracking. It doesn't match GA but in some cases that's all I need.
I don't think Cloudflare's info is very helpful, at least in the free/cheap plans. It can help to roughly identify where your visitors come from and how many visits are from bots but that's about it.
> However this still requires setting up the image on a third-party server.
While this is true, we found a solution to bypass ad blockers (which could be implemented by Google Analytics as well). My experience is that ad blockers only block scripts and pixels that are implemented on multiple websites [1]. With having a custom domain and a non analytics named script or URL, ad blockers are unlikely to block you. At Simple Analytics we created a feature for this where customers can point a CNAME to our server [2]. We setup SSL and proxy all requests to our server. This makes it almost impossible for ad blockers to block the stats of those customers. [1] https://github.com/easylist/easylist/pull/1855 [2] https://docs.simpleanalytics.com/bypass-ad-blockers
For those of you hosting on your own server, this is a PSA that awstats is still working. It reads server logs and makes little graphs via a cron job. It's fun to have analytics going back to 2002 in the same format.
Yes, I've also been using awstats for many years. It definitely works for a small site, has a lot of useful features and occasional releases still keep up with new user agents, etc. that pop up over time. Each time I want to switch I fail to find a suitable replacement.
That said, behind the curtain, awstats has plenty of problems and shows its age. Most of it is a single ~20 kline script with hundreds of global variables, so it's very challenging to debug. There are no tests. Over time it also had plenty of security issues [1]. I wouldn't recommend running it in any other mode than for generating static HTML reports from an unprivileged cronjob. I've made my own test suite and I'm using a slightly patched version with ~20 commits on top of the latest release that fix problems I found and that upstream didn't merge (still from the times of SourceForge - since they switched to GitHub they do seem to be a bit better in accepting pull requests). However it doesn't help with submitting patches that, for example, concerns regarding GDPR compliance are met with responses like [2]. [1] https://security-tracker.debian.org/tracker/source-package/a... [2] https://github.com/eldy/awstats/issues/110
I read issue [2] and I think its reasonable to do this at the LogFormat level. awstats doesn't need to do everything, that is probably how it got to be 20,000 lines.
I always use awstats to generate static pages, and that's what any security conscientious operator should do.
I see users with a valid issue (even quoting relevant laws) being called names and told in a patronizing tone that widely accepted interpretations of said laws are wrong.
Comments (137) 34 threads
1. I would rename the pixel.png to something like image.png. Never call your script anything like tracking, analytics, or pixel when you don't want to be blocked by ad blockers. We use hello.js and hello.gif. [1]
> Log file parsing is an old-skool but effective way of measuring the traffic to your site.
2. By using a pixel image you can bypass caching. When using server logs without the image you only get the non cached requests. So an image like you use is a better approach.
3. Your image is being cached. So if somebody revisits your website your image will not be loaded and you will not find anything in your logs. Just disable your etag and add a expiry date of the past.
Awesome that more and more people are replacing Google Analytics with more simple tools. GA is overly complicated and has not the best privacy mindset. I built Simple Analytics [2] as a privacy friendly alternative.
[1] https://docs.simpleanalytics.com/script
[2] https://simpleanalytics.com
But this is a tracking script, no? If I were you I'd keep the name that way so that if people don't want to be tracked, they don't.
If you really want to block you can enable the Do Not Track setting. Although I think this should only be used when you are actually tracking people (we don't). So this feature might be removed in the future. It's already removed by Safari because it is another parameter to fingerprint a browser.
[1] https://docs.simpleanalytics.com/bypass-ad-blockers
You don't have to play the privacy game -- there is a lot of space between really respecting user's privacy and breaking privacy laws. But if you do, you should put the power back in the user's hand.
(Disclaimer: I work for Google.)
Continue this thread — 4 replies
You've basically said you know some users block your stuff, but you think they probably shouldn't really want to block your stuff, so you devise an end run around them.
Then, finally, you conclude that if they really want to block your stuff, they should do something that you yourself admit won't block your stuff, but that's okay because they shouldn't want to block your stuff.
Continue this thread — 9 replies
How do you deal with this sort of tracking?
Continue this thread — 3 replies
No. This is self-hosted analytics, no 3rd-party involved, the way it's supposed to be.
Tracking involves a 3rd-party. Be it Google Analytics or Cambridge Analytica UserTracking (TM).
To be clear about the other thread about bypassing ad blockers. We will not have this feature when tracking user flow. People should have the right to block events if they want. But for basic info as in page views we keep offering the ad blocker bypass feature.
[1] https://news.ycombinator.com/item?id=19136044
This also bypasses Ad blocker. In the case you have a large percentage of technical audience (who presumably would have Ad blocker installed) this log can be way more accurate than GA.
However this still requires setting up the image on a third-party server. I would really love it if GitHub pages or Netlify can provide some simple server-side tracking. It doesn't match GA but in some cases that's all I need.
That would be a great feature for GitHub Pages! Just a simple interface like https://simpleanalytics.io/simpleanalytics.io would serve most GH Pages use cases, I would think.
Not for me. `/pixel.png?` is blocked by default in uBlock.
GA does a good job at extrapolating your data to account for users with ad block. Obviously not perfect, but good enough for most cases.
Cloudflare does this for free, and you can run it on top of Netlify, Github/Gitlab pages, etc.
https://www.cloudflare.com/analytics/
While this is true, we found a solution to bypass ad blockers (which could be implemented by Google Analytics as well). My experience is that ad blockers only block scripts and pixels that are implemented on multiple websites [1]. With having a custom domain and a non analytics named script or URL, ad blockers are unlikely to block you. At Simple Analytics we created a feature for this where customers can point a CNAME to our server [2]. We setup SSL and proxy all requests to our server. This makes it almost impossible for ad blockers to block the stats of those customers.
[1] https://github.com/easylist/easylist/pull/1855
[2] https://docs.simpleanalytics.com/bypass-ad-blockers
https://awstats.sourceforge.io/
That said, behind the curtain, awstats has plenty of problems and shows its age. Most of it is a single ~20 kline script with hundreds of global variables, so it's very challenging to debug. There are no tests. Over time it also had plenty of security issues [1]. I wouldn't recommend running it in any other mode than for generating static HTML reports from an unprivileged cronjob.
I've made my own test suite and I'm using a slightly patched version with ~20 commits on top of the latest release that fix problems I found and that upstream didn't merge (still from the times of SourceForge - since they switched to GitHub they do seem to be a bit better in accepting pull requests). However it doesn't help with submitting patches that, for example, concerns regarding GDPR compliance are met with responses like [2].
[1] https://security-tracker.debian.org/tracker/source-package/a...
[2] https://github.com/eldy/awstats/issues/110
I always use awstats to generate static pages, and that's what any security conscientious operator should do.
I see users with a valid issue (even quoting relevant laws) being called names and told in a patronizing tone that widely accepted interpretations of said laws are wrong.
https://matomo.org/blog/2018/01/piwik-is-now-matomo/
All comments shown.
Couldn't load more comments. Check your connection and try again.