Add separate UK countries (Scotland, Wales, England, Northern Ireland) to Geo list

tomsherman

29-08-2017

There is only an option at present for all of the UK. It would be great if there was a way to target each individual country specifically.

2 Comments (2 New)
2 Comments

Jason_Hickey

Employee

31-08-2017

Hello!  Thanks for this suggestion. This capability is not currently offered by our geo data provider, but it is a great suggestion.  the current workaround would be to include all of the counties (or shires) that belong to one of the UK countries and create a reusable segment.  You'd only have to do that once and would have the same level of targeting.  

tomsherman

06-09-2017

Thanks Jason. The solution we went with was to write a profile script which returns the relevant country depending on the users postcode:

var reScotland = /(AB|DD|DG|EH|FK|G|HS|IV|KA|KW|KY|ML|PA|PH|TD|ZE)\d{1,2}(\s|)\d[A-Z]{2}/i; var reWales = /(CF|CH|GL|HR|LD|LL|NP|SA|SY)\d{1,2}(\s|)\d[A-Z]{2}/i; var reNorthernIreland = /BT\d{1,2}(\s|)\d[A-Z]{2}/i;  if (profile.geolocation.zip) {      if (reScotland.test(profile.geolocation.zip)) {           return 'scotland';      } else if (reWales.test(profile.geolocation.zip)) {           return 'wales';      } else if (reNorthernIreland.test(profile.geolocation.zip)) {           return 'norther ireland';      } else {           return 'england';      } }