The Context interface
In Sitecore Search, you can get personalized search results that depend on both the page being viewed and the visitor. You can send these values in a Context object.
Context
|
Name |
Type |
Description |
|---|---|---|
|
|
ContextGeo |
Contains information about the visitor's geolocation. |
|
|
Array<string> |
List of IDs. |
|
|
ContextLocale |
Contains information about the country and language the page is being viewed in. |
|
|
ContextPage |
Contains information about the page where the request was made. |
|
|
ContextTime |
Contains information about time of request. |
|
|
ContextUser |
Contains information about the visitor. Required for personalization and accurate analytics. |
|
|
Object |
Contains UTM campaign parameters. |
Unless indicated otherwise, all values are optional.
Other Context related methods
The following code block lists the various context-related methods that are accessible through the Request object. After the installation of the JS Data package into your project, these methods and their documentation are available in your IDE.