9 ms·
Show HN: Counter – Simple and free web analytics
- shermozle 4y agoHow the hell are you getting unique visitors without cookies or IP addresses? I call bullshit.
- e-clinton 4y agoGuid stored in local storage?
- worksonmine 4y agoTomato tomato. A httpsonly cookie (as a tracking cookie should be) is just as visible as localstorage. So sure, technically correct not a cookie but does the name matter when the result is identical. "Hey, I got an idea how we get rid of those pesky cookie banners, let's drop the cookies, no.. wait.. hear me out. We store the id... in localstorage! Brilliant!" POW Confetti. It's cookies.
- robertlagrant 4y agoIt's not cookies. It can't be used to track you across sites the way that a cookie can, as all the embedding site needs to do is ping the site the cookie is for, and it's done. How do multiple sites access the same localStorage?
- worksonmine 4y agoIs that really how httpOnly cookies work though? That and cross-origin is supposed to solve that, but I might not be aware of the work-around you're referring to. Did a search that turned up nothing, do you have a source? I can't try myself right now. But last time I checked it's not at all that easy. What am I missing?
- weird-eye-issue 4y agoWell, no, but you wouldn't set httpOnly if you wanted to do that
- panopticon 4y ago> How do multiple sites access the same localStorage? With an iframe. Although Safari already has protections in place against this scenario: https://webkit.org/tracking-prevention/#partitioned-third-party-storage https://webkit.org/tracking-prevention/#partitioned-third-pa...
- schemescape 4y agoI support this behavior, but I wish it allowed users to opt-out per domain or something. The current behavior breaks localStorage on HTML5 games on itch.io (for iPad users, mostly) and there’s no real workaround (other than asking users to disable the setting entirely—something I don’t want them to do). It’s not even possible to detect this case and warn users, so they just think the games are broken…
- weird-eye-issue 4y agoCookies can't really track you across sites reliably these days either. And in just the next couple years it will be almost entirely disabled by default in all major browsers
- ihucos 4y agoHello worksonmine, please see on my upper response a more technical elaboration on how it works. It is not the same as cookies. Cheers
- worksonmine 4y agoIt's not really a more technical explanation. I get how localstorage and cookies are different. But it's a technicality the user doesn't care about. The problem is third party cookies. Self-hosted solutions where only the site I visit tracks me is not a problem even for me as a privacy extremist. But calling it "no cookies" and putting the id in localstorage is misleading or misunderstanding the problem people have with cookies in the first place. Don't get me wrong I like the effort and was looking for something similar before just implementing my own solution with regular nginx logs. But this is a space where trust is important.
- ihucos 4y agocounter.dev does not use any id at all for tracking.
- worksonmine 4y agoNo? How do you identify a specific browser? What's in these values? var id = document.currentScript.getAttribute("data-id"); new URLSearchParams({ id: id, }) You send it to the server (so I assume it can be used to identify a specific device) and call it an id in the code. Can't wait to see how you are going to try to wrap it to tell me it's technically not an id but...
- duiker101 4y agolooking at the code that seems to be the id of the website not of the user. You might have multiple websites on one instance of Counter and you just need to let the server know on which one to record the view. IIRC, GDPR doesn't really care about cookies, but about storing information on the user's machine. sessionStorage would still fall under this classification. So it doesn't really matter if they are different or not. That said, it does seem like Counter does not use user ids.
- ihucos 4y agoHello I am the counter.dev maintainer. No! To see the complete tracking script in all glory check it out here: https://github.com/ihucos/counter.dev/blob/master/docs/script.js https://github.com/ihucos/counter.dev/blob/master/docs/scrip... The relevant part is here: 13| sessionStorage.setItem("_swa", "1"); With that the script marked that the visit was tracked and no further http requests to track the unique view are send.
- speedgoose 4y agoI appreciate that the whole tracking script fits on my smartphone screen.
- schemescape 4y agoFrom the GitHub page: > Counting unique users is achieved with a combination of relying on sessionStorage facilities, the browser's cache mechanism and inspecting the referrer. Using this technique considerably reduces the complexity and load on the server while improving data privacy at the cost of knowing less about users. We can't and don't want to be able to connect single page views to an user identity.
- zichy 4y agoThis is not directly related to Counter, but here is a nice explanation of how GoatCounter[1] has implemented session tracking: https://github.com/arp242/goatcounter/blob/master/docs/sessions.markdown#goatcounters-solution https://github.com/arp242/goatcounter/blob/master/docs/sessi... [1]: https://www.goatcounter.com https://www.goatcounter.com
- ihucos 4y agoAlso a very interesting approach. The difference to counter.dev is that counter.dev does not need any hashes or any unique ids at all, which saves complexity and avoids needing to explain why our specific way of using hashes or ids is privacy friendly. As we have none.
- rambambram 4y agoIt can be done without cookies. I built a simple visitor stats module for my website package, based on the solution of Simple Analytics. They explained that they make a difference between unique and non-unique visitors by checking if the referrer is your own site. If so, it's not a unique visitor. Of course there are edge cases, but for my case it works more than good enough. I thought it was a brilliant solution from Simple Analytics and I figured I could build something like that myself. It was also fun and I learned a lot.
- zapt02 4y agoLooks cool. Any chance you would provide a docker-compose.yml file for self hosting? Right now it's not really simple to do so.
- ihucos 4y agoYes, I would like to do it. But to be quite honest there are other priorities on top of that. Of course we're happy to accept pull requests though!
- bottled_poe 4y agoI think self-hosting is the future of analytics for the reasons described in many of the other comments: ad blockers, browser privacy settings and content filters are here to stay and will only become more powerful. If we can’t self-host, it’s going out with the tide.
- ihucos 4y agoIt is done :-) https://github.com/ihucos/counter.dev-selfhost https://github.com/ihucos/counter.dev-selfhost
- deleted 4y ago[deleted]
- softskunk 4y agooof, i can’t load the page because it’s blocked by my Pi-Hole.
- paulgb 4y agoI noticed the other day that blocklists really don’t like the word “counter”. I had a bunch of simple demos, one of which was a counter, and it was the only one that didn’t work. Turned out u-block was preventing it from loading.
- xjay 4y agoThis is a never-ending problem with web applications that use so-called "routing" (where the client is made to make connections to a variety of URLs, which gets blocked if the URL contains "ad" or similar).
- weird-eye-issue 4y agoThat's not called "routing"
- ThePinion 4y agoSame. The whole domain shows up in the list. I have too many lists right now to know which is blocking it. Does Pi-Hole have an easy way to see which list a domain comes from? edit: it's in the https://v.firebog.net/hosts/AdguardDNS.txt https://v.firebog.net/hosts/AdguardDNS.txt adlist.
- derrasterpunkt 4y agoUnder „Tools“ > „Search Adlists“.
- ThePinion 4y agoHidden in sight :> counter.dev is in the https://v.firebog.net/hosts/AdguardDNS.txt https://v.firebog.net/hosts/AdguardDNS.txt adlist. It seems someone else's mention of adlists not liking the word 'counter' is true. There's almost 300 domains with 'counter' in it just in that list.
- dang 4y agoRelated: Show HN: Counter – Simple and Free Web Analytics - https://news.ycombinator.com/item?id=26379569 https://news.ycombinator.com/item?id=26379569 - March 2021 (77 comments) Edit: reposts are fine after a year or so: https://news.ycombinator.com/newsfaq.html https://news.ycombinator.com/newsfaq.html. Lists of "related" links are just for curiosity.
- deleted 4y ago[deleted]
- ihucos 4y agoAll planned :-)
- ihucos 4y agoI am maintaining counter.dev - If you have any questions, don't hesitate to ask :-)
- rftyuikdjhgvcf 4y agowhy not offer static content hosting like gitlab pages and give us the logs on that. cut the js beacon middle man. ...I mean, I myself block your beacons and didn't even know before looking just now. -- someone who just looked at recent vps prices for a small personal static site and went with gitlab "hosting" .
- ihucos 4y agoThat is a complete valid technical solution if you can go trough the effort to do it. I'd recommend GoAccess, looks good but I have not used it myself. It's just that it can be cumbersome and a lot of people have websites but are not techies for example.
- skymast 4y agoI would prefer to selfhost all my analytics. Any plans for that?
- ihucos 4y agoYes, but not very soon. So the thing is that counter.dev is optimised to handle many users for free. For example as the primary database Redis is used. But if you are actually paying for the server resources SQL is just fine. The service is optimised for efficiency and my concern would be that having some kind of "white label" self hosting one click solution would bring in too much complexity that would go against the aim of saving server resources in order to offer the service for free. Maybe I am wrong, but that is my current thinking. That being said you can technically self host and I am happy to answer questions at hey@counter.dev . Is just that this solution is not designed to be self hosted and with another web analytics solution the self hosting experience could be more streamlined. One thing that for me would actually make sense is having a conventional backend that plug and plays with the awesome counter.dev UI - then the "only" codebase change would be to whitelabel the UI. But yeah, that might not happen anytime soon.
- ihucos 4y agoIt is done :-) https://github.com/ihucos/counter.dev-selfhost https://github.com/ihucos/counter.dev-selfhost
- breck 4y agoLooks interesting. I've been absolutely loving GoAccess. Never going back to Google Analytics. How does this compare?
- ihucos 4y agoI would say comparing GoAccess and counter.dev is a little bit like comparing apples and oranges. GoAccess analyses log files, that is a more robust approach I would say. I wonder how GoAccess can know unique Unique Visitors, guess that is directly mapped to the IP address which should be fairly accurate. An advantage with GoAccess as a website owner is that you can see traffic coming in from users using things like uBlock origin which is pretty widespread actually. With counter.dev you have some metrics that you do not have with GoAccess like for example device type, the country of the users and some other minor things. But the biggest advantage is that it is easier to integrate. There are a lot of people with something like a Wordpress site for their restaurant that email me asking how to add counter.dev's tracking script into their site. Many people don't have access to their log files and I think it would be impractical for them to literally compile their analytics tool. So if you are happy with GoAccess and have it set up you don't need to change. But if you want to try counter.dev you get your tracking script after just registering with a username and a password. Then put the tracking script in your site and that's it.
- tech234a 4y agoI've been using Counter for a few of my small sites for a number of months now and I find it is non-invasive and does a good job of providing basic analytics. Thanks for making this tool available for free!
- ihucos 4y ago<3
- onion2k 4y agoOne of the saddest trends in web dev over the past decade or so is the shift away from hosting on a server you have access to and moving over to something opaque like Netlify or Vercel. Pretty much all of the data you can get from a JS-plugin based third party like Counter is sitting in your Apache/nginx/IIS log files if you host your site on a server you control, but without the need for stuffing yet another piece of client side code that has no benefit to the user in to the HTML. It's not likely to change so I'm just yelling at a cloud right now, but website stats is one of the biggest losses in modern web dev so it bugs me. Maybe more than it should. For what it's worth, Counter looks to be a much better option than Google-"here's 200KB of glacially slow JS because screw users"-Tag-Manager.
- dewey 4y ago> but website stats is one of the biggest losses in modern web dev That seems a bit overly dramatic. If you look at your log files these days you'll see that a high percentage of it is just scrapers, bots, scripts trying to access wp-admin etc. Collecting this information somewhere else (instrumented backend, client-side script) makes a lot more sense now where you can filter out noise more easily. There's also very light client-side scripts like https://plausible.io https://plausible.io which are a nice trade-off between privacy and useful information while not being too heavy.
- shanebellone 4y agoPlausible is not lightweight. Its codebase is large for the problem its solving. JavaScript is not the way for analytics.
- 8organicbits 4y agoRequest logs are a source of truth for certain metrics. A tracker service may get you more metadata than the request line in the logs, but something like 25% of internet users use ad block, which often blocks trackers as well (I block plausible). Not seeing metrics for bots, scrapers, and x% of users can really mess up certain metrics.
- 4y ago
- sophiabits 4y agoIt would be nice to see comparisons to other options in this space—e.g. I’m currently self hosting umami for analytics, and it does what I need it to (I think anyway—I’m a software engineer and not a marketer/SEO!) How does Counter compare? I couldn’t grok that from the website or GitHub repo
- marvinblum 4y agoYou can find a more complete list of (european) based web analytics and other tools here: https://european-alternatives.eu/category/web-analytics-services https://european-alternatives.eu/category/web-analytics-serv... (not my website)
- lzzzam 4y agoThanks a lot :)), I didn´t know this website!
- ihucos 4y agoHa, thanks I did not know site. Will submit counter.dev to it. Counter.dev is hosted in Frankfurt, Germany and tries to comply with German laws.
- marvinblum 4y agoIn case anybody cares, you'll also find mine there (pirsch.io).
- deleted 4y ago[deleted]
- Giorgi 4y agoLooks good, needs wordpress plugin for real proliferation