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

# view_category Event

> Track when a visitor views a collection or category page

Fires when a visitor views a collection or category page. Use this to track browsing behavior and build category-based audiences.

<Note>
  **Shopify:** Automatically tracked when viewing collection pages.
</Note>

## JavaScript

```javascript theme={null}
window._upstack('track', 'view_category', {
  items: [
    { id: 'SKU_001', name: 'Classic Cotton Tee', price: 34.99 },
    { id: 'SKU_002', name: 'Vintage Logo Hoodie', price: 59.99 },
    { id: 'SKU_003', name: 'Slim Fit Jeans', price: 79.99 }
  ],
  itemListId: 'summer_collection',
  itemListName: 'Summer 2026 Collection'
});
```

Minimal example:

```javascript theme={null}
window._upstack('track', 'view_category', {
  itemListId: 'mens_shirts',
  itemListName: 'Men\'s Shirts'
});
```

## Properties

| Property     | Type   | Required | Description                                                                            |
| ------------ | ------ | -------- | -------------------------------------------------------------------------------------- |
| itemListId   | string | No       | Collection/category identifier                                                         |
| itemListName | string | No       | Collection/category display name                                                       |
| items        | array  | No       | Products shown in the category (see [Item Object](/pixel/standard-events#item-object)) |

## When to Fire

* Collection page load
* Category filter applied
* Browse by category navigation

## Related Events

* [view\_content](/pixel/events/view-content) — When viewing an individual product
* [view\_item\_list](/pixel/events/view-item-list) — For general product lists (recommendations, etc.)
* [search](/pixel/events/search) — When viewing search results
