Show HN - Client-side Google Analytics without using cookies
humane-tehnologije.si
humane-tehnologije.si
Please do take this all with a grain of salt, because not a single website here actually adheres to the current implementation of the cookie-law. The political process has been set in motion to change the law and exempt anonymous statistics from the permission-requirements. This "soon to be exception" is already used by virtually all website and the regulatory agency responsible for enforcement seems to have decided not to make a problem of it for the time being.
Use this code (GitHub) to implement client-side Google Analytics without storing data on user's device (cookies, cache, local storage, Etags...). The solution still uses the data from client devices to facilitate user tracking. Please check cookie laws of your individual country to see if you can legally use this approach without user opt-in.
Edit: I guess this is what the OP's link is actually using.
EDIT: Client Id still needs to be generated for Google's Analytics.js. In my experience, the approach we took for that works quite well without using complicated browser foot-printing.
The irony is that most websites can actually avoid using invasive cookies all-together and avoid confusing users with cookie dialogs. That was our strategy when ensuring compliance for our clients and the submitted no-cookie GA library was a part of that.