This page documents an earlier version of the API client. For the latest version, see Send events.
search
Sending multiple events in a batch can be useful when:
- Importing historical data
- Sending events from your backend
clickedObjectIDsAfterSearch
convertedObjectIDsAfterSearch
addedToCartObjectIDsAfterSearch
purchasedObjectIDsAfterSearch
clickedObjectIDs
convertedObjectIDs
addedToCartObjectIDs
purchasedObjectIDs
clickedFilters
convertedFilters
viewedObjectIDs
viewedFilters
Examples
The following example sends three events for the same user: one click event, one view event, and one conversion event. For more information about initializing the JavaScript Insights clientaa
,
see Initialize the Insights client.
Parameters
An array of event objects
JavaScript only: Additional parameters for the
search-insights
library.Example:JavaScript
Absolute value of the discount in effect for this object, measured in
currency
.Must be a decimal number with no more than 16 characters (including non-digit characters).The price of the item.
This should be the final price, including any discounts.Must be a decimal number with no more than 16 characters (including non-digit characters).
The quantity of the purchased or added-to-cart item.
The total value of a purchase is the sum of
quantity
multiplied by the
price
of each purchased item.ID of the query that this specific record is attributable to. Used
to track purchase events with multiple items originating from different searches.Objects without a query ID aren’t included in revenue analytics.
For more information, see Revenue transactions.See also: Keep track of query IDs