Live data from Hacker News

The Google Analytics Setup I Use on Every Site I Build

philipwalton.com

61–70 of 108 posts

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

#61

Filtering out GA sessions with the language of "C" (versus actual languages like en-us, fr, etc.) goes a long way in filtering out GA spam. This language code is 99% of the time associated with bots. I had one site where 20% of all the sessions in a given month was such fake traffic!

Isn't that a relatively easy thing for a spammer to change? Also, I'm seeing some valid traffic coming in with that language (conversions and everything).

Most won't bother

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

#62

Please don't contribute to Google's tracking dominance over the web. How insane is it that one company runs their javascript on 90% of the web?

What are the best alternatives?

The long term solution is usually building an in-house analytics service but it's not easy and cheap. We're also developing a generic analytics platform that can be installed with one-click to your favorite cloud provider so that you can store your event data in your database and build an internal analytics service without coding. Check out: https://github.com/rakam-io/rakam

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

#64

Earlier quoted context omitted.

> a lot of bots still don't execute JavaScript I operate a service that measures this (see another comment on this discussion), and all I'll say is you'll be very surprised how many bots actually execute JS, especially stealth bots. You have to be careful either way.

> all I'll say is you'll be very surprised how many bots actually execute JS Interesting. Do you have any numbers you can share?

It's very easy to navigate sites programmatically including script execution:

http://zombie.js.org

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

#65
post #48

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 a…

Google Tag Manager is not very practical in cases where you want a secure website. It renders CSP useless because it requires all sorts of permissions like 'self' on scripts and CSS. It's good to have on the marketing webpage where no user content is displayed though.

Can you elaborate on this? I recently had my marketing team ask me to replace GA with Google Tag Manager, and I'm not all that familiar with either, as running the web site is just a minor thing I do on the side of my product work... but this sounds like something I should know more about.

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

#66
post #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 o…

Can you elaborate as to what sort of spam you are referring to? Do you mean bots viewing your pages? Or is it something else?

Referral spam. Pretty common nowadays. Plenty of articles talking about it and showing how to filter it.

https://moz.com/blog/how-to-stop-spam-bots-from-ruining-your...

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

#67
post #34

Earlier quoted context omitted.

Scroll Tracking, Engagement Tracking (riveted.js), Outbound Link Tracking and lots of other things that are not in the default GA setup. I understand why a site owner would want those things, but as a user it is terrifying! This is why I run an ad blocker.

Understandable - and I think people don't know enough of what Analytics solutions are doing behind the scenes for sure. In GA's case, none of this is personally identifiable (Google actively strips info which could be PII out of listings), and the way Scroll Tracking is implemented could only ever be used in aggregate. So that is something.

[deleted]

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

#69

Earlier quoted context omitted.

I think the question is: Do you know what percentage of your visitors that applies to? I don't disagree with your mindset at all, but could you be missing out on a large percentage of users and now know about it?

I very well could, but I'm not going to find out. All it takes is one blogger somewhere to see that I collect stats like "70% of my visitors block tracking" and then the smear pieces start with wonderful headlines like "X tracks users that explicitly disabled tracking" and I lose a significant portion of my user base. I've had it happen before, i'm not going to make the same mistake again. It's kind of a hamfisted ap…

if you block tracking, i'm going to treat you like you don't exist

Are you saying that you ignore server logs?

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

#70

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?

I wonder if anybody's done a mashup to compare/correlate GA figures with server-side ones from logs.
Post reply on HN