Skip to main content

The geo object

Abstract

Describes the geo portion of the context object.

The geo object is located in the context object. It contains information about the end user's geographic location like their IP address, country, state, and so on.

Important

If the API request contains inconsistent geographic information, the Sitecore Discover AI system can not utilize geo-specific intelligence.

The following table lists the attributes supported in the geo object:

Name

Type

Description

ip

string

Optional.

IP address of the user that is sent by the browser or native application.

Note

Do not pass the IP of your server or proxy. If IP is not specified, it is read from the X-Forwarded-For header of the request. If there is no X-Forwarded-For header, the IP of the request is used.

country

string

Optional.

Two-letter country code (ISO Alpha-2). Computed automatically using IP if not provided.

state

string

Optional.

Full name of state or province (also referred to as region). Computed automatically using IP if not provided.

Example: North Dakota, not ND.

city

string

Optional.

Full name of city. Computed automatically using IP if not provided.

zip

string

Optional.

Zip/Postal code of the location. Computed automatically using IP if not provided.