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

> Auto-derived array of product IDs sent to advertising platforms.

<Warning>
  `content_ids` is **not** a user-input property. It is automatically derived from your `items` array during event forwarding.
</Warning>

## How It Works

When you send events with an `items` array, the platform extracts product IDs and forwards them as `content_ids` to advertising platforms (Meta, TikTok, etc.).

**Do this:**

```javascript theme={null}
window._upstack('track', 'view_content', {
  items: [
    { id: 'SKU-001', name: 'Running Shoes', price: 99.00 },
    { id: 'SKU-002', name: 'Athletic Socks', price: 12.00 }
  ]
});
// → Forwards content_ids: ['SKU-001', 'SKU-002'] to destinations
```

**Not this:**

```javascript theme={null}
// ❌ Don't pass content_ids directly
window._upstack('track', 'view_content', {
  content_ids: ['SKU-001', 'SKU-002']
});
```

## Derivation Logic

The platform extracts IDs from the `items` array using this priority:

1. `item.id` (preferred)
2. `item.item_id`
3. `item.product_id`
4. `item.sku`
5. `item.variant_id`

## Related Properties

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

  <Card title="searchTerm" icon="magnifying-glass" href="/pixel/events/properties/search-term">
    User-input property for search queries.
  </Card>
</CardGroup>
