GeoData

Version:

Type

Interface

Import path

@sitecore-cloudsdk/search/browser

Geographical data about the search request.

Signature

export interface GeoData {
  ip?: string;
  location?: LocationData;
}

Properties

Name

Type

Description

Value

ip

string

Optional.

The IP address of the site visitor's device.

If unset, Sitecore Search first tries to get the IP address from the X-Forwarded-For request header. If the request does not have an X-Forwarded-For header, Sitecore Search uses the request's IP address.

"86.0.2.1"

location

LocationData

Optional.

The geographical coordinates of the location where the site visitor made the search request.

In context, location represents the site visitor's current location.

Used for returning search results relevant to the site visitor's current location, such as a list of nearby stores.

N/A

If you have suggestions for improving this article, let us know!