Live data from Hacker News

The Google Analytics Setup I Use on Every Site I Build

philipwalton.com

21–30 of 108 posts

Re: The Google Analytics Setup I Use on Every Site I Build

#22
post #13

It looks like navigator.sendBeacon is not very well supported across browsers. [1] Is this really a good idea? 1: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/s...

analytics.js falls back to the older methods in unsupporting browsers.

Re: The Google Analytics Setup I Use on Every Site I Build

#23
It's pretty annoying that I have to create spam filters for Google Analytics to be useful. Every site I've installed GA on has required me to filter out spam. I don't understand why something isn't done about it at an engineering level. If site owners can set up filters against spammers, is it really that hard for Google to do it? Especially since they can see it across their accounts. Seems like it's the same type of issue that plagues email, yet Google seems to have that under control.

Re: The Google Analytics Setup I Use on Every Site I Build

#24
Echoing what others are saying, I much prefer Google Tag Manager. Many clients use a CMS which make injecting dynamic variables into a page a bit of a pain if it's not done via rules at runtime.

The Next Web has open-sourced its Google Tag Manager setup (https://github.com/thenextweb/gtm), which has things like Scroll Tracking, Engagement Tracking (riveted.js), Outbound Link Tracking and lots of other things that are not in the default GA setup. They have recently added support for AMP.

In my experience it allows clients to get up and running with a useful GA setup in a couple of hours and means that you as a developer don't get bothered to make trivial changes.

Re: The Google Analytics Setup I Use on Every Site I Build

#25

With the surge in Ad Blocking recently, part of me wonders how accurate the Google Analytics JavaScript tracker is today, and how accurate it will be in 5 years. I wonder if we'll see a trend back to server-side analytics soon.

On technical sites I'm seeing traffic cut at least in half by GA against traffic measured server side (excluding bots), which isn't too surprising. On others by maybe a third. It is probably gradually becoming more and more inaccurate as users install blockers. I doubt many GA users are aware of this though. Anyone else seeing this?

Re: The Google Analytics Setup I Use on Every Site I Build

#26

With the surge in Ad Blocking recently, part of me wonders how accurate the Google Analytics JavaScript tracker is today, and how accurate it will be in 5 years. I wonder if we'll see a trend back to server-side analytics soon.

The percentage of visitors with an ad blocker depends on your site's audience. Outside of computer geeks and gamers, almost no one uses ad blockers. I wouldn't buy into the hype that the whole world is installing ad blockers.

I encourage friends and family to install ad blockers. I've been asked numerous times over the years to look at a computer that has either died or just isn't working well anymore. I always offer to install an adblocker after the actual problem is addressed and about everyone leaves with an adblocker.

Its not technically difficult at all. It takes a few clicks to install and one click to disable on the minority of sites that don't work with ad blockers.

I highly doubt I'm entirely atypical.

Re: The Google Analytics Setup I Use on Every Site I Build

#27

Tag Manager is definitely preferable in my experience if you want to empower non technical people such as marketing to make their own changes on the fly without having to bother developers.

Yup, GTM is great until the folks in marketing add a script to the site without first testing in preprod that causes the UI for the app to not render.

Re: The Google Analytics Setup I Use on Every Site I Build

#28

Earlier quoted context omitted.

Reports are from 20-30% of desktop and mobile users make use of some sort of adblocker/privacy tool. That is a very large set of users, and in some industries and domains the numbers go much higher. Purely for self-protection/anti-aggravation I absolutely recommend it to every casual user I advise.

I don't believe that figure at all for the general populace.

Why not. Try sharing a link to ublock origin on facebook with text to the effect that installing the add on from the link will remove 90% of the annoying clutter from the web, make everything load faster, and protect their computers from malware.

Realize that the link in either the chrome or firefox case will be to the official addon site and in the mind of the user safe doubly so since it came from someone trusted.

What percentage of people who see it will spend the 3 clicks to install it?

* Note I know you have no incentive to actually do so its hypothetical many people are encouraging non techies to do so and have been doing so for a very long time the percentage that are aware of adblocking is increasing.

Re: The Google Analytics Setup I Use on Every Site I Build

#29
post #11

Earlier quoted context omitted.

Actually, number of people using ad-blockers has more than doubled between 2015 and 2016 according to the PageFair report [1]. [1] https://pagefair.com/blog/2016/mobile-adblocking-report/

"More than doubled" doesn't mean much if it's 0.0000001% to 0.0000002%. It certainly wouldn't refute what I said.

You are right, but the number of ad-block users is significant now -- around 20% (accd. to the same PageFair report).

I have also personally seen around 30% users use ad-blockers, for a site with around 100,000 visitors a day. However, most of the audience for that site is people in twenties, so it's not surprising to see higher than average ad-blocker usage.

Re: The Google Analytics Setup I Use on Every Site I Build

#30

With the surge in Ad Blocking recently, part of me wonders how accurate the Google Analytics JavaScript tracker is today, and how accurate it will be in 5 years. I wonder if we'll see a trend back to server-side analytics soon.

I think JavaScript analytics is more or less here to stay. A broader move to server-side analytics depends on what you're going to use the data for. When I want clean(er) data for important metrics, like revenue/conversion rate for eCommerce sites, I implement a hybrid JS/back-end solution where I send important data to the GA API or Mixpanel via some back-end service [1]. I've found that revenue data in GA compared to the database on a number of sites I have consulted for can be off quite a bit, and sometimes +/- 25%, depending on how the JavaScript has been implemented.

With larger businesses, you'll probably see more server-side implementations as they have the budgets to ensure the data they're collecting is accurate. For a blogger or a small publisher without a dedicated tech team, there's nothing easier than dropping in a script tag and watching the data roll in.

[1]https://developers.google.com/analytics/devguides/collection...

Post reply on HN