GitHub

ShopifySearchQuerySuggestion

Type

import { ShopifySearchQuerySuggestion } from '@daffodil/driver/shopify'

A suggested search term returned by the predictiveSearch query. Query suggestions help customers refine their searches by showing relevant terms as they type.

The text field provides the plain suggestion, while styledText includes HTML tags to highlight matching portions. Implements Trackable for analytics reporting on search traffic origins.

interface ShopifySearchQuerySuggestion {
  __typename: "SearchQuerySuggestion"
  styledText: string
  text: string
  trackingParameters: string
}

Properties

__typename
"SearchQuerySuggestion"
styledText
string

The text of the search query suggestion with highlighted HTML tags.

text
string

The text of the search query suggestion.

trackingParameters
string

URL parameters to be added to a page URL to track the origin of on-site search traffic for analytics reporting. Returns a result when accessed through the search or predictiveSearch queries, otherwise returns null.