OptionalautocompletePreact autocomplete main component
OptionalautocompleteMinimal input length to render autocomplete
OptionalautocompleteDefault autocomplete page query parameters. Supplied as an object or a function that returning search query Functional version can be use for building complex autocomplete queries. It's more flexible and provides access to other config parameters.
Optionalbrandreturns current brand
OptionalcategoryCategory root component
OptionalcategoryCSS selector for category content rendering
OptionalcategoryEnable category fallback when service is unavailable (overwrites global fallback option).
By default it will redirect to original page by disabling new page. If custom function is provided, it will be called with query object.
It's important that this path does not have same path as search page.
Optionalcategoryreturns current category id
Optionalcategoryreturns current category path
OptionalcategoryDefault category page query parameters. Supplied as an object or a function that returning search query Functional version can be use for building complex category queries. It's more flexible and provides access to other config parameters.
Indicates if URL parameters should be compressed. If enabled, default range separator is '~'.
OptionalcontentCSS selector for search page rendering.
OptionaldebounceDebounce delay for search input
Merchant's default Currency.
OptionaldropdownCSS selector for autocomplete dropdown render. Leave undefined for default use (After input element)
OptionalfallbackEnabled fallback for serp & category pages when service is unavailable By default, it will restore the native content.
If set to 'legacy', it will force a page reload and disable the search for the current session.
CSS selector for form to unbind it.
OptionalformForm unbind delay after how long it should delay, default is unbinding without delay ms
OptionalgaToggles Google Analytics usage. Defaults to true.
OptionalhistoryHistory component
OptionalhistoryIndicates if history should be enabled
OptionalhistoryHistory size
OptionalhitHit decorators are used to modify the products hits before they are rendered.
OptionalinputCSS selector for each input element to bind search events like input change and form submit.
OptionalisDetermine if current page is category Example: return location.pathname.includes('category')
OptionalmemoryEnable in-memory caching for autocomplete results.
If enabled, the autocomplete results will be cached in memory, and the same results will be returned for the same query without making a new request.
Merchant ID.
OptionalpersistentEnable persistent caching for search results.
If enabled, the search results will be restored from cache when returning to the search page, from example, from a product page.
The cache is stored in the browser's session storage.
OptionalpreservePreserve page scroll position when navigating back to search page.
If enabled, it's highly recommended to also enabled persistentSearchCache for best user experience.
OptionalqueryCustom function, when provided, can be used to modify search query before sending it to the server. A default implementation is provided in the config that returns the query without any modification. Note: The query parameter itself should not be touched, but instead a new object should be returned in case modifications are needed.
SearchQuery
PageType | undefined
OptionalrenderMaximum time to wait for the injection targets to be available in the page, in milliseconds
OptionalretriesNumber of retries for search request. Retries won't be applied for autocomplete requests.
OptionalretryInterval between retries in milliseconds
OptionalserpPreact search page main component.
OptionalserpEnable search fallback when service is unavailable (overwrites global fallback option).
By default it will redirect to original page by disabling new page. If custom function is provided, it will be called with query object.
It's important that this path does not have same path as search page.
OptionalserpSearch page path, renders in any page if not specified
OptionalserpIndicates if search should redirect to search page or just rewrite history
In case a function is provided, it will be called with the query object and autocomplete options.
OptionalserpDefault search page query parameters. Supplied as an object or a function that returning search query Functional version can be use for building complex search queries. It's more flexible and provides access to other config parameters.
OptionalserpDelay serp page rendering given until given async function resolves Default function waitForElement can be imported from "@nosto/preact"
OptionalserpFront end URL both ways mapping, to convert URL param values and keep the request keys { query: 'q' - will map query param to appear as q in URL product.filters: 'ff' - will map to ff.0.field.0: 'brand' and so on.. product.size: 'size' - will map to size: 24 }
OptionalspeechSpeech to text component
OptionalspeechIndicates if speech to text should be enabled
Optionalvariationreturn current variation id, can be supplying for supplying multi-currency and B2B variations
User provided configuration