Analytics
2.6K members online now
2.6K members online now
Ask questions about filter set-up and issues with using filters in Google Analytics reports
 
Guide Me
star_border
Reply

How Precises Is Filtering by City?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I am wanting to filter my data to show traffic from my county, as well as from each town in my county.  However, the towns in my county range in population from a little over 12,000 to under 100 people.  I'm afraid that my data won't be accurate as it may show visitors as being from bigger cities in my state (which are not in my county).  So, how precises is filtering by city?

 

I'm also not sure how to how to format my filter pattern for these towns.  The demo showed entering the city name with no state or country.  I know there are larger cities with the same name in different states and countries.  Right now I have them formatted as "Cambridge, KS".  Will that work or do I need to format them differently?

2 Expert replyverified_user

How Precises Is Filtering by City?

Rising Star
# 2
Rising Star

Hi Stacey,

 

Accuracy depends on many variables including device type, IP address, Wifi and cell tower connection.   That said, the accuracy "is what it is" and all things being equal will give you a good approximation and understanding of trends over time.

 

Regarding filtering, you'll need to use the data as it exists in GA which you can find here:

 

https://developers.google.com/analytics/devguides/collection/protocol/v1/geoid

 

Separately, I wrote a white paper / guide on adding county level data to GA that you may find useful and you can find it here: 

 

http://www.morevisibility.com/resources/white-papers/a-guide-to-adding-county-data-to-google-analyti...

 

In the text there is a link to a data file that you can upload.  Unfortunately you need to provide some information (twice, ugh) in order to get access to both.

 

Hope that helps!

 

Best,

 

Theo Bennett

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Re: How Precises Is Filtering by City?

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Thank you @Theo Bennett, but what I really need is to be able to filter my data so that I only see the data for one specific county.  I am trying to set up analytics for a county-wide news site.  It is good to be able to see who from the surrounding areas is visiting the site (commuters, family members, etc.), but what I'm really interested in is creating a view that will narrow down the data to my specific county. 

 

So, for example, let's say that my site only covers news from Atoka County, Oklahoma.  I want to create a view that only shows data for users that are in Atoka County.  So I create a new view called "Atoka County".  Now, I create a filter for that view to include the following cities/towns:  Atoka, Caney, Stringtown, and Tushka.  I know that I can add multiple cities to the same filter by formatting them "City1|City2|City3|City4". 

 

But how do I let Google Analytics know that I am referring to Atoka, Oklahoma and not Atoka, Tennessee?  How do you format the filter pattern?  Do I use

  • Atoka,OK
  • Atoka, OK
  • Atoka, Oklahoma
  • Atoka,Oklahoma,United States
  • 1024124 (Criteria ID)
  • 21169 (Parent ID)
  • Something completely different?

This is where I get completely lost because I will never be dealing with areas as heavily populated as Salvador, Rio de Jeneiro, or Sao Paulo that they use in the Analytics Help documents.

How Precises Is Filtering by City?

Explorer ✭ ✭ ✭
# 4
Explorer ✭ ✭ ✭

Hi Stacey,

 

what you would do is create a new view named "Atoka Country". In this view you will have to apply two filters. First filter will apply on country and the other on the specific cities in this country. Make sure to have the country filter first and city filter later because analytics deals filters in the order they are created.

 

I hope you will not have to worry about Atoka, Oklahoma and Atoka, Tennesssee. Let us know if it works for you

 

regards

Noman

How Precises Is Filtering by City?

Rising Star
# 5
Rising Star

Here's a great article discussing accuracy:

https://radical-analytics.com/case-study-accuracy-precision-of-google-analytics-geolocation-42645106...

John Wedderburn, Advertiser Community, Rising Star
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.

Re: How Precises Is Filtering by City?

Rising Star
# 6
Rising Star

Hi Stacey,

 

You can do as @Noman K suggests but you will first need to do everything in my 20 page white paper and fill out two forms - yuck!  Smiley Happy  (County is not available in GA by default)

 

A better option is just to create a new view, your first filter will be based on region and the filter field will be Oklahoma, then the second filter field will be City and the pattern will be the cities which are contained in that county. 

 

Filters are cascading so that when the city filter matches you'll only have sessions from OK and then the next filter will discard the other cities.  The only way this does not work is if there are to Atoka's (etc.) in Oklahoma.

 

ss region.png

 

Make sense?

 

Best,

 

Theo

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn