search
Use this event to track when users convert after a previous Algolia request.
For example, a user clicks on an item in the search results to view the product detail page.
Then, users add the item to their shopping cart.
If you use Algolia to build your category pages,
youβll also use the convertedObjectIDsAfterSearch
event.
For details where this event is used, see Event types.
Related methods:
addedToCartObjectIDsAfterSerch
: specifically track Added to cart events.purchasedObjectIDsAfterSearch
: specifically track Purchase events.convertedObjectIDs
: track conversion events not related to Algolia requests.sendEvents
: if you donβt want to send real-time events.
Examples
For more information about initializing the JavaScript Insights clientaa
,
see Initialize the Insights client.
JavaScript
Parameters
Name of the specific event.Format: 1-64 ASCII characters, except control characters.To maximize the impact of your events,
use consistent event names and consistent formatting,
for example, βProduct Added To Cartβ (always in title case).For example, you can adopt Twilio Segmentβs object-action framework.
Name of the Algolia index.Format: same as the index name used by the search engine.Some API clients use
index
instead of indexName
.List of object IDs for items of an Algolia index.You can include up to 20 object IDs.
Unique identifier for a search query.A
queryID
is required for events related to search or browse requests.If you add clickAnalytics: true
as a search request parameter,
the queryID
is included in the API response.See also: Keep track of query IDsAnonymous user identifier.See also: User token
Pseudonymous identifier for authenticated users.See also: User token
Donβt include personally identifiable information in user tokens.