> ## Documentation Index
> Fetch the complete documentation index at: https://algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Converted object IDs after search

> Send a conversion event related to an Algolia request.

**Required ACL:** `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](/doc/guides/solutions/ecommerce/browse/tutorials/category-pages),
you'll also use the `convertedObjectIDsAfterSearch` event.

For details where this event is used, see [Event types](/doc/guides/sending-events/concepts/event-types).

**Related methods:**

* [`addedToCartObjectIDsAfterSerch`](/doc/libraries/search-insights/added-to-cart-object-ids-after-search): specifically track *Added to cart* events.
* [`purchasedObjectIDsAfterSearch`](/doc/libraries/search-insights/purchased-object-ids-after-search): specifically track *Purchase* events.
* [`convertedObjectIDs`](/doc/libraries/search-insights/converted-object-ids): track conversion events **not related to Algolia requests**.
* [`sendEvents`](/doc/libraries/search-insights/send-events): if you don't want to send real-time events.

## Examples

For more information about initializing the JavaScript Insights client `aa`,
see [Initialize the Insights client](/doc/libraries/search-insights/init).

```js JavaScript icon=code theme={"system"}
aa("convertedObjectIDsAfterSearch", {
  userToken: "anonymous-123456", // required for Node.js
  authenticatedUserToken: "user-123456",
  eventName: "Product Converted",
  index: "YourIndexName",
  queryID: "queryID",
  objectIDs: ["objectID-1", "objectID-2"],
});
```

## Parameters

<ParamField body="eventName" type="string" required>
  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](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework).
</ParamField>

<ParamField body="indexName" type="string" required>
  Name of the Algolia index.

  **Format**: same as the index name used by the search engine.

  Some API clients use `index` instead of `indexName`.
</ParamField>

<ParamField body="objectIDs" type="string[]" required>
  List of object IDs for items of an Algolia index.

  You can include up to 20 object IDs.
</ParamField>

<ParamField body="queryID" type="string" required>
  Unique identifier for a search query.

  A `queryID` is required for events related to search or browse requests.

  If you add [`clickAnalytics: true`](/doc/api-reference/api-parameters/clickAnalytics)
  as a search request parameter,
  the `queryID` is included in the API response.

  See also: [Keep track of query IDs](/doc/guides/sending-events/guides/queryid)
</ParamField>

<ParamField body="userToken" type="string" required>
  Anonymous user identifier.

  See also: [User token](/doc/guides/sending-events/concepts/usertoken)
</ParamField>

<ParamField body="authenticatedUserToken" type="string">
  Pseudonymous identifier for authenticated users.

  <Warning>
    Don't include personally identifiable information in user tokens.
  </Warning>

  See also: [User token](/doc/guides/sending-events/concepts/usertoken)
</ParamField>
