Google Analytics logs all visits from Northern Ireland, Scotland, Wales and England as being from United Kingdom.
Hmmm, debatable. They have their own parliaments… and football teams!
Politics aside, it is difficult to separate out visits from all of these countries once they are aggregated and logged as ‘United Kingdom’. If visits were attributed to each country separately, it would be easy to group them using a simple regular expression or even just by adding up the number of visits from each.
The GA issues with UK
Markets. Here in the Republic of Ireland, we share many all-Ireland agencies with Northern Ireland, and for many companies the island of Ireland is considered one market.
Delivery areas. For other companies, Northern Ireland is a separate market to the Republic of Ireland, but they still need to analyse each country separately because they deliver to the North, but not to England, Scotland or Wales.
Customer segmentation. Because we are all on the one little island here, I often need to maintain an ‘Island of Ireland’ segment, as well as a ‘Republic of Ireland’ segment and a ‘Northern Ireland’ segment. The UK is far too blurry a distinction.
Is this a technical constraint?
Google Analytics derives the geographical location of a visitor from the IP address. There is no country-specific characteristic I can use to detect what country an IP address is from. Telephone numbers have this: any phone number that starts with +353 is from the Republic of Ireland. However, with IP addresses, you’d need to consult a massive directory of them to figure out where in the world it’s based. That takes too much time.
The directory does provide regional information, which means it is possible to detect whether a visit is from Northern Ireland, England, Scotland or Wales. Therefore, I believe Google could breakdown the UK segment for us.
GA loopholes
Ireland Only Filter. In order to restrict a profile to just collecting data on visits that originated within the Republic of Ireland only, we can apply a simple filter as follows:
Visitor Country = Ireland
Northern Ireland Only Filter. There is no Visitor Country = Northern Ireland, since GA logs any visits originating there as having come from the United Kingdom.
But we can work around this. If you drill down on the UK, you will see that there are a limited number of “cities” in Northern Ireland, few enough that we can capture them in a city filter:
Visitor City = (Londonderry|Coleraine|Belfast|Portadown|Lisburn|Newry|Glengormley|
Dunmurry|Newtownards|Newtownabbey|Antrim|Enniskillen|Banbridge)
Note that there is a 255 character limit on filter fields, but you should still have sufficient space to add plenty more cities if required.
Maintain a profile excluding all these cities, and keep an eye on the ‘Map Overlay’ report to ensure that no visits from Northern Ireland are visible on the map. If there are, you should add the city to your ‘Northern Ireland Cities’ filters so that they check for this new city in future.
But what if you want one profile with both of these restrictions applied? You can do it, but it’s a bit complicated.
If you apply:
Include Country is “Ireland” and Include City is “A Northern Ireland city”
to a single profile, any visit must satisfy both of these criteria in order to make it into the profile.
A single visit cannot match ‘originating in Republic of Ireland’ and match ‘originating in Northern Ireland’. So you have just filtered all traffic out of your profile. Much head scratching will follow as you wonder why your Google Analytics is broken and pick up the phone to call Niamh in IQ Content!
Why does this approach not work?
A number of includes on one profile should be considered conditions separated by ‘AND’
For example: ‘meets condition A AND meets condition B’
A number of excludes on one profile should be considered conditions separated by ‘OR’.
For example: meets condition A OR meets condition B
So if we apply Include Ireland and Include Northern Ireland as two separate filters, because it is not possible for both of these conditions to be achieved concurrently, the result is that no visits make it into your profile.
Island of Ireland Filter?
We need somehow to get these into one big include filter.
Cascading Custom Advanced Filters
Robbin Steif in Lunametrics has written about this technique, and called them “Cascading Filters“. I like it, much more eloquent than my own term….”great, big, giant filters made up of filters on top of other filters”.
Rewrite the Country and City fields into a spare field
I thought I could use an advanced custom filter to achieve this. The objective is to copy the Country and City into Custom Field 1.
So this spare field, Custom Field 1, would contain the country followed by the city
For example: Ireland, Dublin or United Kingdom, Belfast.
Then I could create a single filter which includes any visits where Custom Field 1, contains either “Ireland” followed by anything or “United Kingdom” followed by any Northern Ireland city
Unfortunately when I select the City field as the field I wanted to rewrite, the City filter isn’t there as an option. A pity, as this would have been an elegant solution.
Thankfully we now have Advanced Segmentation, with the added bonus that when I write an Advanced Segment filter, I can apply it to my historical data.
Unlike profile filters, using advanced segmentation I can join conditions that operate on two different fields (Country and City) using the logical operators, AND and OR.
So, just drag and drop the Country from the left nav and type ‘Ireland’ , click the ‘Add “or” statement’ link, then drag and drop the City metric from the left nav, and paste in your Northern Ireland cities. Give the segment a name, like “Include Island of Ireland”.
This advanced segment is now attached to the User ID which created it, so you can apply this segment in any profile you are viewing in any of your accounts.
If any of you across the pond have strong feelings on separating out visits from Northern Ireland, Scotland, Wales and England please comment, and let me know of any other approaches you have taken. Surely, the Scots have something to say on this!





Pingback: » The Geographical Trouble with Google Analytics – iQ Blog- SFWEBDESIGN.com
August 2, 2009 at 12:33 pm
I’ve only recently started blogging. I placed the google analytics code hoping that after 1 day, I’d at least see a litytle bit of traffic. It’s been five days and when I checked it, there’s just one visitor who dropped by since. I installed another widget (sitemeter) and it shows that I’ve had 57 unique visitors. I still don’t know how everything works but it seems to be that sitemeter is more precise than google analytics. What do you think?
August 5, 2009 at 5:02 pm
Hi Karen
Great that you have started tracking your blog. I dont have experience with Sitemeter, it wouldnt be mainstream here in Ireland anyways. Unique visitors is a figure that is far more likely to be overcounted than undercounted, so if GA is recognising all visits as being from the same visitor then that is probably accurate.
Most analytics tools feed a cookie to each browser that visits your site, and if that browser returns, and the cookie was not blocked or deleted in the mean time, then the unique visitors figure is not incremented (although visits, pageviews etc will still be incremented). I imagine this has been happening with your GA account, repeated visits from the same browser, probably your own.
You could experiment by visiting your site from Internet Explorer and from Firefox, and repeating an hour later. GA should log 2 visitors, as you visited from two different browsers and no tools can recognise two browsers on the same machine as the same person. I think that Sitemeter will probably log 4 visitors, and so is overcounting.
The tools generally do what they have been designed to do. It is the analyst that needs to be precise and accurate. I would contact Sitemeter and find out how they measure “unique visitors”.
I wish you success with your blog.
Best wishes
Niamh
August 9, 2009 at 3:46 pm
That’s a really useful article. Thanks. Do you know how Google tracks visits from very rural areas? Does it just map them to nearest city?
August 11, 2009 at 10:58 am
Hi John
Locational data in GA is calculated based on IP address. Note that Google do not store down the IP address, as this would constitute personally identifiable information and GA only reports on site visitor data in aggregate, eliminating the “big brother” factor. Google processes each IP address by doing a geo-IP look up then discard it.
In my experience, within Ireland, the regions/cities report provides the location of a visitors Internet Service Provider. In the USA it is likely that a visitors location and their ISPs location will be the same, however within Ireland this is not as likely. I have observed high concentrations of visits from unlikely locations, for example Dungarvan, Co Waterford, where Cablesurf Broadband are based.
So unfortunately I wouldnt tend to rely on city/region information, particularly for tracking visits from rural areas, as the location of the visitor and the location of the ISP are unlikely to be the same.
If you let me know why you wanted this information I may be able to assist you with alternative suggestions. For example, if you were hoping to measure the response to local radio campaigns you might want to advertise a particular URL for each locality, and have the URL redirect with a dedicated query parameter to your home page, thus allowing you track the response in each locality.
Many thanks for your comments!
All the best
Niamh
August 11, 2009 at 1:00 pm
I was reading your original post on a beach in Derrynane, Kerry using a 3 Broadband USB connection. I was just wondering how my visit was going to be registered.
August 18, 2009 at 1:45 pm
I think you can easily solve your island of Ireland problem with an advanced segment that uses Region matching Northern Ireland and Country matching Ireland
August 18, 2009 at 1:46 pm
Just see you did something similar at the end of the post….anyway think region is easier and probably more accurate than the cities
August 18, 2009 at 4:30 pm
Hi Brian
Many thanks for reading and I was not aware that Northern Ireland was available in GA as a region, this is not immediatley apparent from the front end and this will be more convenient than filtering on city.
Unfortunately the Advanced Segments will not give us Unique Visitors, and they filter at visit level, which profile filters dont necessarily do, so I had a quick look at the profile filter options in GA but no Region or similar there unfortunately.
I understand there is a bit of preamble in my post before getting to the resolution, but having learnt and taught this a bit I find it is more beneficial to demonstrate how to find answers than to just provide answers.
Thanks again for reading.
Best wishes
Niamh
August 20, 2009 at 3:49 am
That’s great. I’m located in the US and do get a good number of visitors from the UK on some of my blogs. I’d like to implement your solution, if for nothing else, to get a more in depth knowledge of GA filtering. I have other “problems” with Google Analytics that I might apply it too. Thanks for the detailed solution.
August 21, 2009 at 12:38 pm
Delighted to be read in the US Troy! Thanks for commenting.
Best wishes Niamh
August 21, 2009 at 5:34 pm
Hi Niamh,
Thanks for the tips. I did what you told me but until now, GA still shows that’ve I’ve only had one visitor since. I installed feedjit and everyday I see people visiting my site from all over the world. This is really weird. I don’t know what else to do.
September 4, 2009 at 12:53 pm
Facebook has the same problem.
Ad targetting only allows you to address markets based on countries. It has no mechanism for targetting Scotland, Wales, England or Norther Ireland in the UK. That is pretty annoying – as they are quite distinct markets, esp if language is an issue, e.g. Welsh language campaigns can be targetted at the whole of the UK only, not just Wales.