News for hackers. Stuff that matters.
Re:EU government websites have undisclosed adtech trackers f... by jrockway on Monday March 18, 2019 @04:04PM (#19424656)
What are y'all using for self-hosted analytics? I have used Google Analytics and Mixpanel out of sheer convenience, but I know many users are uncomfortable sharing their data with those sites.

To relate this to the article: what should these government agencies be using? Or should they not be looking for Javascript errors, A/B testing, etc. at all?

Re:EU government websites have undisclosed adtech trackers f... by codazoda on Monday March 18, 2019 @04:28PM (#19424913)
I've actually switched to an old school "counter" that I wrote myself. I just couldn't find anything that was modern and that I was sure provided privacy. I also don't need much.

I look at the data in Google Sheets.

On the page I want to track I paste a script tag that includes a few lines of JS from my counter site. That JS script hits a PHP script with the URL the user requested. I don't track ANY user details. No browser info, no IP address, no fingerprinting, etc. It would be trivial to track those things though. The PHP script logs the data to a CSV file (which I plan to change to an SQLite DB soon).

I have a Google Sheet setup where the first field of data is '=IMPORTDATA("https://example.com/data.csv")'. Google Sheets automatically fetches that data every time you open the sheet; no API integration required. Then I have a simple bar chart on the data.

Re:EU government websites have undisclosed adtech trackers f... by alimi on Monday March 18, 2019 @05:27PM (#19425497)
Just as a warning, it was pretty trivial to be able to look at your java script and get the csv file that you described.

I doubt that you care that much since the data isn't sensitive but just a heads up.

Re:EU government websites have undisclosed adtech trackers f... by bobthepanda on Monday March 18, 2019 @06:03PM (#19425813)
The best way to prevent the theft of sensitive data, is to not have any in the first place.
Re:EU government websites have undisclosed adtech trackers f... by derefr on Monday March 18, 2019 @05:57PM (#19425745)
The GP commenter makes it clear that the CSV file is written to on the server-side (using PHP) as a consequence of request handling, not on the client side. There is no place that the CSV URL is visible, other than in the PHP source (that clients cannot access) and in the Google Sheet (which is presumably internal to the GP's GSuite domain.)

It's security-by-obscurity, maybe (as all public "secret token" URLs are) but it's better than what you're implying.

Re:EU government websites have undisclosed adtech trackers f... by im3w1l on Monday March 18, 2019 @07:51PM (#19426562)
fwiw I was able to find the csv as well.

EDIT: You are right in theory though.

Re:EU government websites have undisclosed adtech trackers f... by pcnix on Tuesday March 19, 2019 @04:04AM (#19428912)
As a learning exercise, I tried to find it too, but I wasn't able to get it from the domain in the js file, could you explain how you got to the final file?

This is strictly as a learning exercise, no malicious intent on my part.

Re:EU government websites have undisclosed adtech trackers f... by lightbyte on Tuesday March 19, 2019 @09:10AM (#19430411)
I was able to quickly get the CSV file as well.

The javascript is located at SITE/counter.js

My first guess for the CSV was SITE/counter.csv

It worked.

Re:EU government websites have undisclosed adtech trackers f... by lotu on Monday March 18, 2019 @04:53PM (#19425174)
In a way this is actually the only "solution" to ensure privacy. A lot of ensuring privacy is knowing down to a very precise detail exactly what data is sent where and what happens to it. The only way to know this realistically is if you wrote the darn thing yourself. Otherwise you have to trust someone that the thing does what it says it does.

We as a society haven't agreed precisely on what "privacy" means so it is effectively impossible to know is a particular service's handling of data provided to meats you definition unless you just don't hand it the data in the first place.

Re:EU government websites have undisclosed adtech trackers f... by cortesoft on Monday March 18, 2019 @05:25PM (#19425477)
> Otherwise you have to trust someone that the thing does what it says it does.

I mean, this is always going to be the case with modern computers. No one writes EVERYTHING themselves, so they have to trust someone else. You are trusting the microcode on the CPU, the system calls on your OS, your compiler/interpreter, your standard library.... I get that this is a different sort/level of trust than trusting a third party metrics system, but it isn't fundamentally different. It is all about trusting someone else's work.

Re:EU government websites have undisclosed adtech trackers f... by pard68 on Tuesday March 19, 2019 @12:14AM (#19428027)
As an exercise, I have been building my own computer from scratch. Started as an adder made in transistors. Became a simple three instruction nand cpu (add, sub, jump). Currently building a very minimalistic copy of a 6502 out of ttl. Goal is to create a machine capable of hosting a website with my dev log and schematics for its own creation. I will have developed every piece of software running on it.
Re:EU government websites have undisclosed adtech trackers f... by sdenton4 on Monday March 18, 2019 @08:05PM (#19426663)
Let a thousand implementations bloom, each with its own security bugs!
Re:EU government websites have undisclosed adtech trackers f... by lucb1e on Monday March 18, 2019 @05:55PM (#19425736)
So... that's not self-hosted then? Still sharing data with Google, albeit in a less useful manner to them.
Re:EU government websites have undisclosed adtech trackers f... by clairity on Monday March 18, 2019 @05:03PM (#19425281)
good on you, but hearing "google sheets" was a bit of a downer. you're still giving data to google, albeit much less.

if you've got php running already, it's straightforward to code up a bar chart from the weblogs you already have (bypassing, csv/sqlite and google sheets altogether). that is, after all, how google analytics started (as urchin).

Re:EU government websites have undisclosed adtech trackers f... by zepearl on Monday March 18, 2019 @04:29PM (#19424918)
Piwik, now called "matomo" ( https://matomo.org ).

Is "matomo" japanese? If yes then the definition is here https://www.nihongomaster.com/dictionary/entry/36221/matomo

Unluckily it cannot give you directly the search string used by people that ended up on your site because search engines don't forward it anymore because of the whole privacy movement that happened some years ago (I am still against it as I don't see why, as website owner selling e.g. clothes, I shouldn't know that a person landed on my website by searching e.g. "yellow pants" => this fake privacy just concentrates all power/knowledge in the search providers, but this is just my personal opinion), but here they sell a plugin ($/year) which apparently can do that: https://plugins.matomo.org/SearchEngineKeywordsPerformance

(I guess that it retrieves directly the search keywords from the search provider, but I did not read the docs nor I tried it out)

Re:EU government websites have undisclosed adtech trackers f... by beagle3 on Monday March 18, 2019 @04:33PM (#19424973)
> I don't see why, as website owner selling e.g. clothes, I shouldn't know that a person landed on my website by searching e.g. "yellow pants"

That doesn't really matter. But if you set up a content farm / honeypot, you shouldn't be able to tell that the search term that brought the person to you is "how to deal with my XXX infection"

Re:EU government websites have undisclosed adtech trackers f... by Symbiote on Monday March 18, 2019 @05:07PM (#19425326)
That's the privacy argument, and it's a good one.

The business argument for Google: they still have the information, and can use it in their analytics, and potential competitors or customers don't have it.

Re:EU government websites have undisclosed adtech trackers f... by drusepth on Monday March 18, 2019 @11:14PM (#19427785)
>But if you set up a content farm / honeypot, you shouldn't be able to tell that the search term that brought the person to you is "how to deal with my XXX infection"

Why not? How else are you going to 1) provide information on dealing with an XXX infection, or 2) recognize enough people are landing at your site looking for advice on their XXX infection that you should provide some answers?

Re:EU government websites have undisclosed adtech trackers f... by zepearl on Monday March 18, 2019 @05:13PM (#19425382)
Ok, that's fair, but maybe only for a tiny percentage of the cases?

Setting up such a "content farm / honeypot" and making it reach the top results of Google/Bing/Yandex/etc... used to be simple but is nowadays probably successful in only very few cases (as search engines are nowadays more and more context-aware), and Google/Bing/Yandex/etc... can still see & use "how to deal with my XXX infection", but whoever doesn't use directly their services cannot.

What I mean is that, in my opinion, the privacy measures in this case centralized even more power in the hands of few companies with very little added/improved privacy.

In my case, running a small techy website, the search keywords were very useful because they allowed me to understand e.g. which keywords forwarded the users to my website by mistake or correctly, to then correct appropriately the contents of my articles to make it more clear what my articles were talking about, or to see that the users had a very specific problem that I did not take into consideration when I wrote a certain article, etc... . Now I cannot see those infos anymore without using Google Analytics which I don't want to use (or, by using the plugin mentioned above, which is good, but for which I would still have to pay $/year, which is bad as it increases fixed costs).

Re:EU government websites have undisclosed adtech trackers f... by beagle3 on Monday March 18, 2019 @11:46PM (#19427928)
I understand where you are coming and I agree it gives Google (or Bing) more power, but ... it was the user's choice to give Google (or Bing) that information by using it as a search engine.

If they gave the information to you too, it likely goes to you, but also to the other 50 .js files you include from various sources of dubious trustworthiness which every site these days includes.

Furthermore, what you are saying is "this admittedly private information used to be available to all and it was useful for some, now it's only available to the entity the user specifically gave it to, and that's bad because the few who actually used it for good don't have it". But the whole idea of GDPR (and similar) laws is to put the control back with the user, which is a good thing.

I think some standard with which the user explicitly lets the website know "yes, the search engine query that brought me here is X and I allow you to have it" would be good, but I don't think dropping this info from the referer (sic) is bad.

Re:EU government websites have undisclosed adtech trackers f... by clairity on Monday March 18, 2019 @05:10PM (#19425351)
the main problem with piwik (tried it a year or two ago) was that they had crippled the installer so that automating updates to cloud platforms was quite difficult (to encourage you into their paid hosted solution). maybe that's changed now, but that put me off on piwik/matomo.
Re:EU government websites have undisclosed adtech trackers f... by atilimcetin on Monday March 18, 2019 @04:21PM (#19424821)
Re:EU government websites have undisclosed adtech trackers f... by XCSme on Monday March 18, 2019 @05:57PM (#19425752)
I actually created a small self-hosted analytics tool myself, but it's more for qualitative feedback during the early days of the product and it's missing a lot of features that Google Analytics (for example) offers, it's more like a self-hosted Hotjar. I like using it from time to time to see if there's something wrong with a specific page or functionality. You can check it out here if you want, but it's not open source https://www.usertrack.net/
Re:EU government websites have undisclosed adtech trackers f... by matt4077 on Monday March 18, 2019 @04:33PM (#19424967)
You can somewhat improve privacy even when using Google Analytics, although I am not sure if this allows using it without users' opt-in.

Somewhere in the settings, you have the option to anonymise users, which is achieved by deleting/not saving the last triplet of IP addresses.

There are some other options, and some functions you should avoid:

- You should set data retention to the minimum of 14 months

- Do not use the User-ID functionality (tracking across devices/browsers)

- Also avoid Remarketing and Advertising Report features.

The downside to all this is that it is mostly invisible to users that you are somewhat protective of their privacy.

Re:EU government websites have undisclosed adtech trackers f... by Nextgrid on Monday March 18, 2019 @06:13PM (#19425890)
This assumes Google is trustworthy. Their business being based on advertising and stealing as much data as possible off everyone, would you trust them to keep their word and work against their bottom line?
Re:EU government websites have undisclosed adtech trackers f... by geuszb on Monday March 18, 2019 @11:32PM (#19427864)
Because the consequences of claiming these things but actually not doing them would be both prohibitively large and impossible to avoid in a large company with a history of whistleblowing employees.
Re:EU government websites have undisclosed adtech trackers f... by lucb1e on Monday March 18, 2019 @05:54PM (#19425721)
I use some GNU tools (like awk and uniq) on my access log file occasionally, after posting a new blog post or so. Otherwise, I don't even look at the data the web server collects.
Re:EU government websites have undisclosed adtech trackers f... by aaaaaaaaaaab on Monday March 18, 2019 @04:55PM (#19425184)
Government websites shouldn’t use javascript at all. Problem solved.
Re:EU government websites have undisclosed adtech trackers f... by mr_toad on Tuesday March 19, 2019 @12:46AM (#19428133)
You could probably implement most of what they do without JavaScript.

But just thinking about my tax return can think of a few features that would have to be dropped, or would become more clunky, like some of the client-side validation, and the auto-saving of drafts.

Re:EU government websites have undisclosed adtech trackers f... by vedantroy on Monday March 18, 2019 @05:03PM (#19425278)
That just isn't possible. Javascript is necessary for many features in today's web.
Re:EU government websites have undisclosed adtech trackers f... by jazzyjackson on Monday March 18, 2019 @06:59PM (#19426217)
It's actually super possible. Today's web is still 100% compatible with forms and cgi. I just signed into amazon with 2FA and checked out with javascript disabled. Healthcare.gov OTOH won't let me past the 'choose your state' drop down.
Re:EU government websites have undisclosed adtech trackers f... by baroffoos on Tuesday March 19, 2019 @02:01AM (#19428436)
How would you make google maps without js?
Re:EU government websites have undisclosed adtech trackers f... by thecatspaw on Tuesday March 19, 2019 @04:12AM (#19428951)
with page reloads. Sure, it wont be fast or feel good to use, but it is doable as a fallback.
Re:EU government websites have undisclosed adtech trackers f... by aaaaaaaaaaab on Tuesday March 19, 2019 @04:57AM (#19429144)
With “page reloads”, the horror!

You should try the dlang forums to see what can be achieved if you don’t fetch 2mbytes of JS from 5 different origins: https://forum.dlang.org

Re:EU government websites have undisclosed adtech trackers f... by azeotropic on Monday March 18, 2019 @05:55PM (#19425726)
Like what? I run with JavaScript off whenever I can. Most of the time when I enable it to access a site, it's obvious the site could be made to work (for the visitor) without JavaScript.
Re:EU government websites have undisclosed adtech trackers f... by XCSme on Monday March 18, 2019 @06:01PM (#19425790)
Like showing and managing the cookies consent pop-up :)
Re:EU government websites have undisclosed adtech trackers f... by grey-area on Monday March 18, 2019 @06:26PM (#19425989)
Fathom looks quite nice:

https://github.com/usefathom/fathom

Re:EU government websites have undisclosed adtech trackers f... by swsieber on Tuesday March 19, 2019 @12:15AM (#19428029)
I've been self hosting fathom. It was a snap to setup.
Re:EU government websites have undisclosed adtech trackers f... by thanatos_dem on Monday March 18, 2019 @04:22PM (#19424827)
I just started my blog (no content yet) and I spun up a Countly server on digital ocean. So far so good, and installing was super easy seeing as it had a pre-configured container you can deploy, but seeing as there haven’t really been visitors yet hard to say how valuable it actually is.
Re:EU government websites have undisclosed adtech trackers f... by ilovetux on Monday March 18, 2019 @06:35PM (#19426054)
I use plain old access.log files fed into splunk. Anything more than that borders on creepy IMO.
Re:EU government websites have undisclosed adtech trackers f... by vonmoltke on Tuesday March 19, 2019 @09:27AM (#19430567)
While not creepy, it's still not in compliance with GDPR.
Re:EU government websites have undisclosed adtech trackers f... by ilovetux on Tuesday March 19, 2019 @12:14PM (#19432213)
How so?
Re:EU government websites have undisclosed adtech trackers f... by scrollaway on Monday March 18, 2019 @04:28PM (#19424901)
Google Analytics has a non-free (enterprise) edition which I believe lets you self host. I'd be ok with govts using that tbh.
Re:EU government websites have undisclosed adtech trackers f... by lmkg on Monday March 18, 2019 @05:11PM (#19425363)
Google Analytics does not have a self-hosted version, even the paid version (GA360). With the paid version it's possible to download the data after it goes through Google via BigQuery, but the data still lives in Google in the meantime.
Re:EU government websites have undisclosed adtech trackers f... by tnorthcutt on Monday March 18, 2019 @05:21PM (#19425450)
I haven't tried it out yet, but https://usefathom.com/ looks interesting.
Re:EU government websites have undisclosed adtech trackers f... by mtmail on Monday March 18, 2019 @06:17PM (#19425928)
We use fathom (their hosted paid plan) and are happy.
Re:EU government websites have undisclosed adtech trackers f... by tibu on Monday March 18, 2019 @05:46PM (#19425669)
I think it is not about internal analytics or a/b testing. It is about adtech scripts like Floodlight, Adnexus and others.
Re:EU government websites have undisclosed adtech trackers f... by mdeligoz on Monday March 18, 2019 @04:21PM (#19424818)
countly
Re:EU government websites have undisclosed adtech trackers f... by auslander on Tuesday March 19, 2019 @10:57AM (#19431367)
>.. using for self-hosted analytics?

ELK (Elasticsearch with Kibana). Pretty powerful and AWS recently forked free Elasticsearch.

Re:EU government websites have undisclosed adtech trackers f... by nukeop on Monday March 18, 2019 @04:06PM (#19424676)
Piwik.
Re:EU government websites have undisclosed adtech trackers f... by kwk1 on Monday March 18, 2019 @04:28PM (#19424902)
Now known as Matomo.
Re:EU government websites have undisclosed adtech trackers f... by GunlogAlm on Monday March 18, 2019 @04:26PM (#19424887)
I tried Piwik but it seemed so cripplingly slow. Trying to load the analytics often took minutes.

Has anybody else experienced this?

Re:EU government websites have undisclosed adtech trackers f... by smacktoward on Monday March 18, 2019 @05:01PM (#19425253)
I have been using Piwik/Matomo for years, and have never experienced this.

That being said, ultimately it's a frontend on a MySQL database, so there's lots of ways it could theoretically be slow -- MySQL isn't configured/tuned properly, the database server isn't resourced appropriately for the amount of data it's hosting, etc. But this is going to be the case for any self-hosted solution.

Re:EU government websites have undisclosed adtech trackers f... by lucb1e on Monday March 18, 2019 @05:56PM (#19425742)
Although it was about five years ago, yes, my potato server (still running the same one today) couldn't handle that by a long shot. Same with Wordpress, Owncloud, and other web-based things that became a little oversized.
Re:EU government websites have undisclosed adtech trackers f... by zepearl on Monday March 18, 2019 @04:36PM (#19425008)
> Trying to load the analytics often took minutes

Do you mean loading the UI which displays the graphs etc...?

Re:EU government websites have undisclosed adtech trackers f... by GunlogAlm on Tuesday March 19, 2019 @12:42PM (#19432533)
Yes, I worded that poorly. I meant loading Piwik's UI; it was cripplingly slow and often timed out. I had little luck in narrowing down the cause, but it was hardly a thorough investigation on my part, IIRC.
Re:EU government websites have undisclosed adtech trackers f... by zepearl on Tuesday March 19, 2019 @04:22PM (#19435370)
Assuming that your disks, DB, CPUs and RAM were all ok, maybe you did not set up PiWik's jobs that are supposed to aggregate the metrics every XX hours/days... ?

https://matomo.org/docs/setup-auto-archiving/