> ## Documentation Index
> Fetch the complete documentation index at: https://meilisearch-6b28dec2-mintlify-code-samples.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Analytics events endpoint

> Use `/events` to submit analytics events such as `click` and `conversion` to Meilisearch Cloud.

<Note>
  This article refers to a new version of the Meilisearch Cloud analytics that is being rolled out in November 2025. Some features described here may not yet be available to your account. Contact support for more information.
</Note>

## Send an event

<RouteHighlighter method="POST" path="/events" />

Send an analytics event to Meilisearch Cloud.

### Body

| Name         | Type    | Default value | Description                                                                     |
| :----------- | :------ | :------------ | :------------------------------------------------------------------------------ |
| `eventType`  | String  | N/A           | The event type, such as `click` or `conversion`, required                       |
| `eventName`  | String  | N/A           | A string describing the event, required                                         |
| `indexUid`   | String  | N/A           | The name of the index of the clicked document, required                         |
| `queryUid`   | String  | N/A           | The [search query's UID](/reference/api/overview#search-metadata)               |
| `objectId`   | String  | N/A           | The clicked document's primary key value                                        |
| `objectName` | String  | N/A           | A string describing the document                                                |
| `position`   | Integer | N/A           | An integer indicating the clicked document's position in the search result list |
| `userId`     | String  | N/A           | An arbitrary string identifying the user who performed the action               |

```json theme={null}
{
  "eventType": "click",
  "eventName": "Search Result Clicked",
  "indexUid": "products",
  "objectId": "0",
  "position": 0
}
```

<Note>
  You must provide a string identifying your user if you want Meilisearch Cloud to track conversion and click events.

  You may do that in two ways:

  * Specify the user ID in the payload, using the `userId` field
  * Specify the user ID with the `X-MS-USER-ID` header with your `/events` and search requests
</Note>

#### Example

<CodeSamplesAnalyticsEventClick />

##### Response: `201 Created`
