1

I added google analytics to the mobile version of my site and three days later it seems that most of the visitors either do not have a language set or a country code set.

Should I assume every browser everyone has access to will always make a language and country code available to servers that request it when browsing a page off that server? or are there actual legit browsers that don't report such information?

My goal is to block out bad bots and allow guests in because I think these unset values is partly to blame for my extremely low income.

I'm looking for the best way for me to handle this issue.

2
  • The majority of real users will be able detectable by IP address unless they want to keep anonymous by using a virtual private network. It's impossible to block bots using GEO IP, this is because most data centres assign IP's in blocks and they have not been 'set' with a location, this is nothing you can do about that, GEO is great for real users, not so much for connections from data centres. Rather than attempting to detect via user agent, language, geo, you should consider throttling users when they do so many requests in X time, this solves the problem of bad bots and bad users. – Simon Hayter Jun 8 '15 at 21:48
  • Ok I already have a throttling system installed on my server. So I take it that having a huge number of unset values like this in analytics is normal for everyone running a website? – Mike -- No longer here Jun 8 '15 at 23:01
1

I added google analytics to the mobile version of my site and three days later it seems that most of the visitors either do not have a language set or a country code set.

First be aware that GA only gives you a "processed" view of your actual traffic. It's purpose is to present you with statistically relevant data and only statistically relevant data. It is not in any way a "logging" system.

It is a statistical tool and is only productively used as such.

If it is not presenting data to you it is because it has not processed it yet (which can take up to several days) or because their algorithms have determined the data is not statistically relevant for whatever mathematical reason. see this link where they specifically mention this effect for language.

https://support.google.com/analytics/answer/2820717?hl=en#BehaviorReports

Should I assume every browser everyone has access to will always make a language and country code available to servers that request it when browsing a page off that server?

The vast majority will pass the users preferred human language(s) in the HTTP Accept-Language header to the server. But, as i said, GA is not a reliable source of that information for you.

There is not yet widespread support for a standard for "country code" or any other form of geo-location. For that you will typically have to use the services of a geo-location service. This can either run on the browser (such as "share location" on Firefox) or run on your web server.

If the mobile browser supports HTML5, it may also support the related GeoLocation API.

or are there actual legit browsers that don't report such information?

Many browser don't supply geolocation information and for those that do, some users switch it off for privacy and other reasons.

Practically no browsers are designed to not use Accept-Language header at all but some browser modes or privacy proxies etc many hide or alter the data.

My goal is to block out bad bots and allow guests in because I think these unset values is partly to blame for my extremely low income. I'm looking for the best way for me to handle this issue.

The best and only practical way is to add code to your web-site/app that directly read the data you need and acts upon. GA is entirely the wrong tool for the job.

IMPORTANT: Filtering web site/app visitors is a lot more complex than just looking at language/country. I would strongly advise you to research the topic separately in more depth and searching to see if your development platform has existing reliable tools for managing this task rather that trying to invent it all yourself from scratch.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.