userLocation

  • Property Manager name: User Location Data
  • Criteria version: The v2023-01-05 rule format supports the userLocation criteria v1.2.
  • Rule format status: GA, stable
  • Access: Read-write
  • Allowed in includes: Yes

The client browser's approximate geographic location, determined by looking up the IP address in a database.

OptionTypeDescriptionRequires
fieldenum

Indicates the geographic scope.

{"displayType":"enum","options":["COUNTRY","CONTINENT","REGION"],"tag":"select"}
COUNTRY

Country.

CONTINENT

Continent.

REGION

States or provinces within a country.

match‚ÄčOperatorenum

Matches the specified set of values when set to IS_‚ÄčONE_‚ÄčOF, otherwise IS_‚ÄčNOT_‚ÄčONE_‚ÄčOF reverses the match.

{"displayType":"enum","options":["IS_ONE_OF","IS_NOT_ONE_OF"],"tag":"select"}
IS_‚ÄčONE_‚ÄčOF

Matches any of the specified values.

IS_‚ÄčNOT_‚ÄčONE_‚ÄčOF

Does not match any of the specified values.

country‚ÄčValuesstring array

ISO 3166-1 country codes, such as US or CN.

field is COUNTRY
{"displayType":"string array","options":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","EU","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GH","GI","GG","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TM","TN","TO","TL","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"tag":"select"}
{"if":{"attribute":"field","op":"eq","value":"COUNTRY"}}
continent‚ÄčValuesstring array

Continent codes.

field is CONTINENT
{"displayType":"string array","options":["AF","AS","EU","NA","OC","OT","SA"],"tag":"select"}
{"if":{"attribute":"field","op":"eq","value":"CONTINENT"}}
AF

Africa.

AS

Asia.

EU

Europe.

NA

North America.

OC

Oceania.

OT

Antarctica.

SA

South America.

region‚ÄčValuesstring array

ISO 3166 country and region codes, for example US:MA for Massachusetts or JP:13 for Tokyo.

field is REGION
{"displayType":"string array","options":["US-AL","US-AK","US-AZ","US-AR","US-CA","US-CO","US-CT","US-DE","US-DC","US-FL","US-GA","US-HI","US-ID","US-IL","US-IN","US-IA","US-KS","US-KY","US-LA","US-ME","US-MD","US-MA","US-MI","US-MN","US-MS","US-MO","US-MT","US-NE","US-NV","US-NH","US-NJ","US-NM","US-NY","US-NC","US-ND","US-OH","US-OK","US-OR","US-PA","US-RI","US-SC","US-SD","US-TN","US-TX","US-UT","US-VT","US-VA","US-WA","US-WV","US-WI","US-WY","CA-AB","CA-BC","CA-MB","CA-NB","CA-NF","CA-NS","CA-NT","CA-NU","CA-ON","CA-PE","CA-QC","CA-SK","CA-YT","AU-ACT","AU-NSW","AU-NT","AU-QLD","AU-SA","AU-TAS","AU-VIC","AU-WA","GB-EN","GB-NI","GB-SC","GB-WA","JP-00","JP-01","JP-02","JP-03","JP-04","JP-05","JP-06","JP-07","JP-08","JP-09","JP-10","JP-11","JP-12","JP-13","JP-14","JP-15","JP-16","JP-17","JP-18","JP-19","JP-20","JP-21","JP-22","JP-23","JP-24","JP-25","JP-26","JP-27","JP-28","JP-29","JP-30","JP-31","JP-32","JP-33","JP-34","JP-35","JP-36","JP-37","JP-38","JP-39","JP-40","JP-41","JP-42","JP-43","JP-44","JP-45","JP-46","JP-47","BR-AC","BR-AL","BR-AM","BR-AP","BR-BA","BR-CE","BR-DF","BR-ES","BR-GO","BR-IS","BR-MA","BR-MG","BR-MS","BR-MT","BR-PA","BR-PB","BR-PE","BR-PI","BR-PR","BR-RJ","BR-RN","BR-RO","BR-RR","BR-RS","BR-SC","BR-SE","BR-SP","BR-TO","DE-BB","DE-BE","DE-BW","DE-BY","DE-HB","DE-HE","DE-HH","DE-MV","DE-NI","DE-NW","DE-RP","DE-SH","DE-SL","DE-SN","DE-ST","DE-TH","FR-ARA","FR-BFC","FR-BRE","FR-CVL","FR-COR","FR-GES","FR-HDF","FR-IDF","FR-NOR","FR-NAQ","FR-OCC","FR-PDL","FR-PAC","CH-AG","CH-AI","CH-AR","CH-BE","CH-BL","CH-BS","CH-FR","CH-GE","CH-GL","CH-GR","CH-JU","CH-LU","CH-NE","CH-NW","CH-OW","CH-SG","CH-SH","CH-SO","CH-SZ","CH-TG","CH-TI","CH-UR","CH-VD","CH-VS","CH-ZG","CH-ZH","CN-AH","CN-BJ","CN-CQ","CN-FJ","CN-GS","CN-GD","CN-GX","CN-GZ","CN-HI","CN-HE","CN-HL","CN-HA","CN-HB","CN-HN","CN-JS","CN-JX","CN-JL","CN-LN","CN-NM","CN-NX","CN-QH","CN-SN","CN-SD","CN-SH","CN-SX","CN-SC","CN-TJ","CN-XJ","CN-XZ","CN-YN","CN-ZJ","IN-AN","IN-AP","IN-AR","IN-AS","IN-BR","IN-CH","IN-CT","IN-DD","IN-DL","IN-DN","IN-GA","IN-GJ","IN-HP","IN-HR","IN-JH","IN-JK","IN-KA","IN-KL","IN-LD","IN-MH","IN-ML","IN-MN","IN-MP","IN-MZ","IN-NL","IN-OR","IN-PB","IN-PY","IN-RJ","IN-SK","IN-TG","IN-TN","IN-TR","IN-UL","IN-UP","IN-WB","SE-K","SE-X","SE-I","SE-N","SE-Z","SE-F","SE-H","SE-W","SE-G","SE-BD","SE-T","SE-E","SE-D","SE-C","SE-S","SE-AC","SE-Y","SE-U","SE-AB","SE-M","SE-O","MX-AGU","MX-BCN","MX-BCS","MX-CAM","MX-CHP","MX-CHH","MX-COA","MX-COL","MX-DIF","MX-DUR","MX-GUA","MX-GRO","MX-HID","MX-JAL","MX-MEX","MX-MIC","MX-MOR","MX-NAY","MX-NLE","MX-OAX","MX-PUE","MX-QUE","MX-ROO","MX-SLP","MX-SIN","MX-SON","MX-TAB","MX-TAM","MX-TLA","MX-VER","MX-YUC","MX-ZAC","UA-CK","UA-CH","UA-CV","UA-CRIMEA","UA-DP","UA-DT","UA-IF","UA-KK","UA-KS","UA-KM","UA-KV","UA-KH","UA-LH","UA-LV","UA-MY","UA-OD","UA-PL","UA-RV","UA-SM","UA-TP","UA-ZK","UA-VI","UA-VO","UA-ZP","UA-ZT"],"tag":"select"}
{"if":{"attribute":"field","op":"eq","value":"REGION"}}
check‚ÄčIpsenum

Specifies which IP addresses determine the user's location.

{"displayType":"enum","options":["BOTH","CONNECTING","HEADERS"],"tag":"select"}
BOTH

Behaves like HEADERS, but also considers the connecting client's IP address.

CONNECTING

Considers the connecting client's IP address.

HEADERS

Considers IP addresses specified in the X-Forwarded-For header, succeeding if any of them match.

use‚ÄčOnly‚ÄčFirst‚ÄčXForwarded‚ÄčFor‚ÄčIpboolean

When connecting via a proxy server as determined by the X-Forwarded-For header, enabling this option matches the end client specified in the header. Disabling it matches the connecting client's IP address.

check‚ÄčIps is either: BOTH, HEADERS
{"displayType":"boolean","tag":"input","type":"checkbox"}
{"if":{"attribute":"checkIps","op":"in","value":["BOTH","HEADERS"]}}