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

# Content Properties

> Properties for content-related events — primarily search queries.

Content properties are used for search and content interaction events.

## User-Input Properties

| Property     | Type   | Description                  | Events |
| ------------ | ------ | ---------------------------- | ------ |
| `searchTerm` | string | Search query entered by user | search |

<CardGroup cols={1}>
  <Card title="searchTerm" icon="magnifying-glass" href="/pixel/events/properties/search-term">
    Search query entered by the user.
  </Card>
</CardGroup>

## Example

```javascript theme={null}
window._upstack('track', 'search', {
  searchTerm: 'blue running shoes',
  items: [
    { id: 'SKU-001', name: 'Running Shoes', price: 99.00 },
    { id: 'SKU-002', name: 'Athletic Socks', price: 12.00 }
  ]
});
```

## Auto-Derived Fields

The following fields are **automatically computed** from your `items` array during event forwarding. Do not pass them directly:

| Field          | Derived From              | Description                      |
| -------------- | ------------------------- | -------------------------------- |
| `content_ids`  | `items[].id`              | Array of product IDs             |
| `content_name` | `items[0].name`           | Name of first product            |
| `content_type` | Inferred                  | `"product"` or `"product_group"` |
| `num_items`    | Sum of `items[].quantity` | Total item count                 |

<Note>
  For product data, always use the `items` array. The platform extracts and formats the necessary fields for each advertising destination.
</Note>

## Related Properties

<CardGroup cols={2}>
  <Card title="Items Array" icon="list" href="/pixel/events/properties/items">
    Pass all product data here — content fields are derived automatically.
  </Card>

  <Card title="content_ids" icon="list" href="/pixel/events/properties/content-ids">
    Learn how product IDs are extracted from items.
  </Card>
</CardGroup>
