Skip to content

Commit

Permalink
Fix analytics conversion instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoocasali authored Jan 8, 2024
1 parent 9f35817 commit 36613d8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions learn/cloud/analytics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ Every time a user clicks on a search result, your application must send a `click

```sh
curl \
-X POST 'https://edge.meilisearch.com' \
-X POST 'https://edge.meilisearch.com/events' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY'
--data-binary '{
"eventType": "click",
"eventName": "Search Result Clicked",
"indexUid": "products",
"objectID": "0",
"objectId": "0",
"position": 0
}'
```
Expand All @@ -70,15 +70,15 @@ The `click` event must deliver an object with the following fields:
"eventType": "click",
"eventName": "Search Result Clicked",
"indexUid": "products",
"objectID": "0",
"objectId": "0",
"position": 0
}
```

- `eventType`: a string indicating this is a `click` event
- `eventName`: a string describing the event
- `indexUid`: a string indicating the clicked document's index
- `objectID`: a string indicating the clicked document's primary key
- `objectId`: a string indicating the clicked document's primary key
- `position`: an integer indicating the clicked document's position in the list of search results

### Configuring conversion rate
Expand All @@ -89,14 +89,14 @@ Once you have established what counts as a conversion in your application, confi

```sh
curl \
-X POST 'https://edge.meilisearch.com' \
-X POST 'https://edge.meilisearch.com/events' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer Meilisearch_API_Key'
--data-binary '{
"eventType": "conversion",
"eventName": "Product Added To Cart",
"indexUid": "products",
"objectID": "0",
"objectId": "0",
"position": 0
}'
```
Expand Down

0 comments on commit 36613d8

Please sign in to comment.