> ## 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 Impressions

## Autocomplete Impression (`ac_impression`)

**Purpose:**
Track when a user is shown autocomplete or suggestion data whether it’s recent searches, popular searches, category or product suggestions, or other content from your search‑suggestion API.

**When to Fire:**
Immediately after your autocomplete/suggestion API returns its response or before you render the suggestion dropdown or list.

**Payload Schema:**

| Field           | Type             | Description                                                                                                                        |
| --------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `no_of_results` | number           | Total number of suggestions length.                                                                                                |
| `ac_source`     | string           | Source of suggestions (e.g. `"search_suggestion"`, `"popular_search"`, `"recent_search"`, `"category"`, `"product"`, `"content"`). |
| `search_term`   | string           | The user’s current search input.                                                                                                   |
| `items`         | array of strings | Array of suggestion identifiers (e.g. SKUs, category IDs, or free‑form suggestion strings).                                        |

**Example:**

```js theme={null}
// After your autocomplete API returns:
const sourceType       = 'popular_search';
const searchTerm       = 'running shoes';
const suggestionCount  = suggestions.length;      // e.g. 3
const suggestions      = suggestions.items;      // e.g. ['shirts','jeans','shoes']


ExpAnalyticsService.trackAcImpression({
  ac_source: sourceType,
  search_term: searchTerm,
  no_of_results: suggestionCount,
  items: suggestions
});
```
