---
title: Analytics
slug: personalized-search/analytics
description: How to retrieve analytics using Monetate's Personalized Search API
image:  https://archbee-image-uploads.s3.amazonaws.com/ceIfEvQHzQk1IVxoRWUh7/K9eTL4jKm7UQINb6zNziJ-20250912-181225.png
docTags: 
createdAt: 2024-09-18T17:14:35.396Z
---

Analytics for Personalized Search can be captured on certain events, but how you capture them differs by event.

For a SearchClicks event, you must make an additional API call when you trigger the event. This directs the relevant analytics data to be captured.

For a Purchase event, certain data must be included on triggering the event. Analytics are then automatically captured.

## SearchClicks Analytics

When you trigger a SearchClicks event, you must make an API call to the following endpoint:

:::CodeblockTabs
SearchClicks Event Endpoint

```html
https://engine.monetate.net/api/search/v1/site-search/{name}/{instance}/{domain}/report-click
```
:::

Pass the `searchClickToken` key-value pair with the call as shown in the following example. Replace the sample token with your own.

:::CodeblockTabs
searchClickToken Example

```json
{
  "searchClickToken": "st.1.WyI1Mg1NjQx3NExJjbGlja2VkIwInJlZCzaG9lcyIsICI1NDMyMS0IsICIxMjCczovL2FkRvlkIl0"
}
```
:::

The possible response codes are as follows:

- **200** Success.
- **400** Bad Request. Your request included a parameter that is unsupported.
- **500** Error. An unknown error has occurred. Please try again or contact your account manager for more information.

## Purchase Analytics

Purchase events are triggered by the [addPurchaseRows](docId\:FNV9UUKQMKGlIdpGCa_5Z) method or by including [monetate\:context\:Purchase](docId:1WbW8Jiq4stq8KCOrSh2n) in the Engine API request. When using Personalized Search, you must include both the `productId` and `sku` parameters in the call.

Personalized Search analytics are automatically captured when you use this call. You don't need to make any additional API calls.

Furthermore, to ensure that the purchase-related data, including sales generated through search, is reported and recorded correctly, you must establish some means of storing or maintaining the persistence of the value of a customer's `monetateId`. Refer to [User Identity Persistence in Requests](docId:7M254uPWksja-XLMmy6m4) for more information.
