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

# Autocomplete Clicks

## Autocomplete Clicks (`ac_click`)

**Purpose:**
Track when a user selects or clicks on a suggestion in the autocomplete dropdown whether it’s a recent search, popular search, product recommendation, category, or other suggestion type.

**When to Fire:**
In the click handler for your autocomplete suggestions, immediately after the user selects one.

**Payload Schema:**

| Field             | Type   | Description                                                                                                                             |
| ----------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| `ac_source`       | string | Type of suggestion clicked (e.g. `"search_suggestion"`, `"popular_search"`, `"recent_search"`, `"category"`, `"product"`, `"content"`). |
| `used_suggestion` | string | The actual suggestion text or identifier the user clicked (e.g. `"jeans"`).                                                             |
| `search_term`     | string | The user’s input at the time of click (e.g. `"shi"`).                                                                                   |

**Example:**

```js theme={null}
// In your autocomplete click handler:
const clickedSuggestion  = 'jeans';
const searchTerm         = 'jea';
const suggestionType     = 'search_suggestion';


ExpAnalyticsService.trackAcClick({
  used_suggestion: clickedSuggestion,
  ac_source: suggestionType,
  search_term: searchTerm
});
```
