Minimal Google Analytics Snippet
Web and SaaS
web analytics snippet
SHOW HN2018
How HN took it
2 positive, 27 neutral or asking, 1 mixed, 7 critical, out of 37 comments about the project. Thread score -0.12.
Privacy: 0 for, 3 againstPerformance: 0 for, 2 againstIdea: 1 for, 1 againstExecution: 1 for, 1 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
Clever and tiny approach to analytics
From 2 comments
Really good point and I agree. This was intriguing at first glance because who doesn't want less JS on their site?! Of course! However, missing out on other events being tracked,…
shift8 on HNNow I am intrigued to make a minimal snippet that creates a histogram of loading times.
LolNoGenerics on HN
Works with SPA frameworks
From 1 comment
It's cool that in also works with SPA frameworks. Thanks for sharing. In other surveilance news, I've been adding Matomo[1] for web analytics to my site for the first time. Used…
gobengo on HN
Objections
Loses events and advanced features Google Analytics provides, hurting Google Ads linkage
From 1 comment
Really good point and I agree. This was intriguing at first glance because who doesn't want less JS on their site?! Of course! However, missing out on other events being tracked,…
shift8 on HN
Caching makes the size concern less important than claimed
From 3 comments
I'm not an expert, just curious... But aren't these files cached on most users computers?
jopsen on HNBoth of Google's recommended methods of adding Analytics to a website load Google's JS library asynchronously[1]. Including it has no meaningful impact a site's time to first…
onion2k on HNIsn't the tag manager and analytics library likely to be cached, thus using zero bytes on average versus the non-zero number of bytes for this library?
jrockway on HN
Bypasses Google's opt-out add-on, a privacy concern
From 1 comment
The snippet seems to circumvent the Google Analytics Opt-out Browser Add-on which many sites mention as a way to disable GA tracking in their privacy policy. So if you use the…
nwellnhof on HN
Requests
Expose an event tracking function
From 1 comment
Will add an option for that as soon as I'm home. Also got many feature requests for exposing an event function. Both of these things shouldn't add any significant size to the…
davidkuennen on HN
Option to anonymize IPs
From 1 comment
Can you include this? ga('set', 'anonymizeIp', true);
largehotcoffee on HN
Configurable tracked fields
From 1 comment
While you're at it, why not be less invasive and neuter some of the data you send across? Does Google need to know about screen colordepth, language settings and text encodings,…
RodgerTheGreat on HN
Questions
Will the Google collect endpoint change over time
From 1 comment
Very cool, thank you! Would you expect Google's API to change often? My biggest concern with something like this is their /collect endpoint changing and analytics data stops…
FoxInBoxers on HN
Is it a GitHub repo
From 1 comment
could you create github repo?
ieq8 on HN
Alternatives named
Matomo / Piwik
From 1 comment
It's cool that in also works with SPA frameworks. Thanks for sharing. In other surveilance news, I've been adding Matomo[1] for web analytics to my site for the first time. Used…
gobengo on HN
Fathom
From 1 comment
For the surveillance conscious I can also recommend using Fathom (https://usefathom.com). I’ve been using it for a few weeks now and have only good things to say.
siddhant on HN
Ahoy for Rails
From 1 comment
I can recommend https://github.com/ankane/ahoy for Rails
masa331 on HN