Location filter
The Location filter matches visitors by where they are browsing from: their continent, country, region, city or postal code. Use it to show country-specific offers, shipping messages or popups, or to run an A/B test only for visitors in certain regions.
Available on: all platforms.
How it's evaluated
The filter reads: Visitor's location is one of [locations]. The visitor's location is looked up from their IP address on every page view. The filter matches if the visitor is in any of the locations you added.
Location takes a moment to resolve. Content that depends on it, such as a campaign variation, stays hidden until it has. Widgets wait for it before their triggers start.
Options
Location type | Matches when | How to add it |
|---|---|---|
Continent | The visitor is on that continent | Search for the continent name |
Country | The visitor is in that country | Search for the country name |
Region | The visitor is in that state, province or other subdivision of that country | Search for the region name. Both top-level regions (such as US states) and second-level ones (such as counties or provinces, where a country has them) are available |
City | The visitor's city, region and country all match | Search for the city name. Type City, Region or City, Country to narrow the results, for example Springfield, Illinois |
Postal code | The visitor's postal code is exactly this code, in any country | Type the code. If no place matches, choose Add as postal code. To add many at once, use Import postal codes from a file (csv) and pick the column that holds the codes |
You can mix types in one filter. For example, "France, Germany, Ontario and 10115" matches a visitor in any of them.
Behavior details
- Postal codes match regardless of country. A postal code entry has no country attached, so 10115 matches both Berlin and any other country that uses the code 10115. To restrict it to one country, add a Country filter in the same group with match all.
- A city is tied to its region and country. "Paris, Île-de-France, France" doesn't match Paris, Texas. Add each city separately if you mean several cities with the same name.
- There's no "is not" option. To target everyone except a location, put the Location filter in a group set to don't match. See Targets.
- IP-based location is approximate. Country is reliable for most visitors. Region, city and especially postal code are less precise, and some mobile networks place visitors in a nearby city. In some countries, such as the UK and Canada, only the first part of the postal code is known.
- VPNs and proxies. A visitor using a VPN, a corporate proxy or a privacy relay is located wherever that service's exit point is.
- Location is checked on every page view. A visitor who travels, or switches a VPN on, can match on one page and not on the next. If a campaign uses the Permanent targeting mode, a visitor who already saw a variation keeps it. See How targeting works.
- Location versus Shopify markets. The Location filter uses the visitor's IP address. The Market filter uses the market Shopify serves the page in, which follows the visitor's country selector choice. Use Market when content must agree with the currency and language on the page.
- Showing the location in text. To insert the visitor's city or country into a widget or campaign, use dynamic text ({geo.city}, {geo.country}).
Examples
- Free shipping bar for one country: a bar widget with a Target rule "Location is one of United States", saying "Free US shipping over $50".
- Exclude a region from a test: an A/B test whose target has one group set to don't match with "Location is one of Quebec".
- Local delivery area: import the postal codes your courier serves from a CSV, and add Country is Netherlands in the same group with match all so that identical codes in other countries don't match.