GEO
Syntax
${GEO.<pathToProperty>}
Definition
Note!
The GEO
marker is exclusively available with our premium add-on and enables custom markers. For an introductory overview of geo lookup and geo-based access controls, please consult the "How to manage access to the website based on the user's IP address or geo location" article.
Utilize third-party geo lookup APIs to fetch geo-location information based on the user’s IP address. Currently, we support the following providers:
- ipstack: Offers a free tier with up to 100 requests per month.
- Geoapify: Provides a free tier with up to 3000 requests per day.
- ipgeolocation: Offers a free tier with up to 30000 requests per month.
- ipapi: Has a free tier with up to 30000 requests per month. This is our default provider.
- ip-api: Provides a free service for non-commercial use and limits up to 45 requests per minute.
Each provider offers distinct sets of data. For instance, "ipapi.co" includes information about a country's population, while "geoapify.com" translates continent and country names into multiple languages. Below are examples of response payloads for each provider's free tier, showcasing the available data. More extensive information can be accessed through premium tiers, requiring consultation of their respective API documentation.
{
"ip": "134.201.250.155",
"type": "ipv4",
"continent_code": "NA",
"continent_name": "North America",
"country_code": "US",
"country_name": "United States",
"region_code": "CA",
"region_name": "California",
"city": "Los Angeles",
"zip": "90012",
"latitude": 34.0655517578125,
"longitude": -118.24053955078125,
"location": {
"geoname_id": 5368361,
"capital": "Washington D.C.",
"languages": [
{
"code": "en",
"name": "English",
"native": "English"
}
],
"country_flag": "https://assets.ipstack.com/flags/us.svg",
"country_flag_emoji": "🇺🇸",
"country_flag_emoji_unicode": "U+1F1FA U+1F1F8",
"calling_code": "1",
"is_eu": false
}
}
{
"city": {
"names": {
"en": "Charlotte"
},
"name": "Charlotte"
},
"continent": {
"code": "NA",
"geoname_id": 6255149,
"names": {
"de": "Nordamerika",
"en": "North America",
"es": "Norteamérica",
"fa": " امریکای شمالی",
"fr": "Amérique Du Nord",
"ja": "北アメリカ大陸",
"ko": "북아메리카",
"pt-BR": "América Do Norte",
"ru": "Северная Америка",
"zh-CN": "北美洲"
},
"name": "North America"
},
"country": {
"geoname_id": 6252001,
"iso_code": "US",
"names": {
"de": "Vereinigte Staaten von Amerika",
"en": "United States",
"es": "Estados Unidos de América (los)",
"fa": "ایالات متحدهٔ امریکا",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"ko": "미국",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
},
"name": "United States",
"name_native": "United States",
"phone_code": "1",
"capital": "Washington D.C.",
"currency": "USD,USN,USS",
"flag": "🇺🇸",
"languages": [
{
"iso_code": "en",
"name": "English",
"name_native": "English"
}
]
},
"location": {
"latitude": 35.166,
"longitude": -80.7935
},
"subdivisions": [
{
"names": {
"en": "North Carolina"
}
}
],
"state": {
"name": "North Carolina"
},
"datasource": [
{
"name": "IP to City Lite",
"attribution": "<a href='https://db-ip.com'>IP Geolocation by DB-IP</a>",
"license": "Creative Commons Attribution License"
}
],
"ip": "104.139.74.164"
}
{
"ip": "134.201.250.155",
"continent_code": "NA",
"continent_name": "North America",
"country_code2": "US",
"country_code3": "USA",
"country_name": "United States",
"country_name_official": "United States of America",
"country_capital": "Washington, D.C.",
"state_prov": "California",
"state_code": "US-CA",
"district": "",
"city": "Los Angeles",
"zipcode": "90012-2607",
"latitude": "34.05810",
"longitude": "-118.24953",
"is_eu": false,
"calling_code": "+1",
"country_tld": ".us",
"languages": "en-US,es-US,haw,fr",
"country_flag": "https://ipgeolocation.io/static/flags/us_64.png",
"geoname_id": "7150250",
"isp": "Los Angeles Department of Water and Power",
"connection_type": "",
"organization": "Los Angeles Department of Water and Power",
"country_emoji": "🇺🇸",
"currency": {
"code": "USD",
"name": "US Dollar",
"symbol": "$"
},
"time_zone": {
"name": "America/Los_Angeles",
"offset": -8,
"offset_with_dst": -7,
"current_time": "2024-04-19 09:02:25.074-0700",
"current_time_unix": 1713542545.074,
"is_dst": true,
"dst_savings": 1,
"dst_exists": true,
"dst_start": {
"utc_time": "2024-03-10 TIME 10",
"duration": "+1H",
"gap": true,
"dateTimeAfter": "2024-03-10 TIME 03",
"dateTimeBefore": "2024-03-10 TIME 02",
"overlap": false
},
"dst_end": {
"utc_time": "2024-11-03 TIME 09",
"duration": "-1H",
"gap": false,
"dateTimeAfter": "2024-11-03 TIME 01",
"dateTimeBefore": "2024-11-03 TIME 02",
"overlap": true
}
}
}
{
"ip": "104.139.74.164",
"network": "104.139.64.0/20",
"version": "IPv4",
"city": "Charlotte",
"region": "North Carolina",
"region_code": "NC",
"country": "US",
"country_name": "United States",
"country_code": "US",
"country_code_iso3": "USA",
"country_capital": "Washington",
"country_tld": ".us",
"continent_code": "NA",
"in_eu": false,
"postal": "28226",
"latitude": 35.0892,
"longitude": -80.8194,
"timezone": "America/New_York",
"utc_offset": "-0400",
"country_calling_code": "+1",
"currency": "USD",
"currency_name": "Dollar",
"languages": "en-US,es-US,haw,fr",
"country_area": 9629091.0,
"country_population": 327167434,
"asn": "AS11426",
"org": "TWC-11426-CAROLINAS"
}
{
"continent": "North America",
"continentCode": "NA",
"country": "Canada",
"countryCode": "CA",
"region": "QC",
"regionName": "Quebec",
"city": "Montreal",
"zip": "H1K",
"lat": 45.6085,
"lon": -73.5493
}
To illustrate, for extracting the in_eu
property from the "ipapi.co" payload, you can utilize the (*bool)${GEO.in_eu}
marker. Similarly, to retrieve the currency code from the "ipgeolocation.io" payload, you can use the ${GEO.currency.code}
marker. Detailed information on properly formatting marker paths is available in this article.
To ensure consistency across providers, common data points are abstracted out by AAM, irrespective of the chosen provider. These guaranteed properties include:
country_name
country_code
continent_name
continent_code
region_name
city
latitude
longitude
In the following example, access to the backend area is allowed only to individuals within Los Angeles city.
{
"Statement": [
{
"Effect": "deny",
"Resource": "Capability:aam_access_dashboard",
"Condition": {
"NotEquals": {
"${GEO.city}": "Los Angeles"
}
}
}
]
}