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

# Complex Properties

> Advanced property types — the items array for product data, SaaS properties for B2B tracking, and auto-captured context fields.

Complex properties handle structured data, B2B/SaaS tracking, and automatically captured context. These properties support advanced use cases beyond simple key-value pairs.

## Properties

<CardGroup cols={3}>
  <Card title="Items Array" icon="list" href="/pixel/events/properties/items">
    Product data for e-commerce events — id, name, price, quantity, brand, category.
  </Card>

  <Card title="SaaS Properties" icon="building" href="/pixel/events/properties/saas">
    B2B/SaaS tracking — accounts, subscriptions, trials, MRR, seats.
  </Card>

  <Card title="Auto-Captured Fields" icon="wand-magic-sparkles" href="/pixel/events/properties/auto-captured">
    Click IDs, UTMs, device info, geo — captured automatically.
  </Card>
</CardGroup>

## Quick Reference

| Property Type       | Description                                  | When to Use                                                    |
| ------------------- | -------------------------------------------- | -------------------------------------------------------------- |
| **items**           | Array of product objects                     | All e-commerce events (view\_content, add\_to\_cart, purchase) |
| **SaaS properties** | Account, subscription, trial, payment fields | B2B/SaaS event tracking                                        |
| **Auto-captured**   | Click IDs, UTMs, device, geo                 | Automatically captured — do not set manually                   |

## Items Array

The `items` array is required for all product-related events. Each item contains product details:

```javascript theme={null}
window._upstack('track', 'purchase', {
  transactionId: 'ORD-12345',
  value: 149.99,
  currency: 'USD',
  items: [
    {
      id: 'SKU-001',
      name: 'Running Shoes',
      price: 89.99,
      quantity: 1,
      brand: 'Nike',
      category: 'Footwear',
      variant: 'Blue / Size 10'
    }
  ]
});
```

<Card title="Full Items Reference" icon="arrow-right" href="/pixel/events/properties/items">
  See the complete items array specification with all supported fields.
</Card>

## SaaS Properties

For B2B and subscription-based businesses tracking accounts, subscriptions, trials, and revenue:

```javascript theme={null}
window._upstack('track', 'subscription_started', {
  accountId: 'acct_abc123',
  subscriptionId: 'sub_def456',
  planId: 'plan_pro_monthly',
  planName: 'Pro Plan',
  mrr: 9900,
  billingInterval: 'month'
});
```

<Card title="Full SaaS Reference" icon="arrow-right" href="/pixel/events/properties/saas">
  See all SaaS properties including trial, payment, and seat tracking fields.
</Card>

## Auto-Captured Fields

<Info>
  **Do not include auto-captured fields in your `track()` calls.** The Upstack Pixel and edge API capture these automatically.
</Info>

Auto-captured fields include:

| Category           | Examples                                                              |
| ------------------ | --------------------------------------------------------------------- |
| **Click IDs**      | `fbclid`, `gclid`, `ttclid`, `msclkid`, `fbc`, `fbp`, `ttp`           |
| **UTM Parameters** | `utm_source`, `utm_medium`, `utm_campaign`, `utm_content`, `utm_term` |
| **Page Context**   | `url`, `path`, `referrer`, `title`, `host`                            |
| **Device**         | `device_type`, `viewportWidth`, `viewportHeight`, `client_user_agent` |
| **Geographic**     | `country`, `region`, `city`, `postalCode`, `timezone`                 |
| **Session**        | `session_id`, `event_id`, `event_time`, `pixel_id`                    |

<Card title="Full Auto-Captured Reference" icon="arrow-right" href="/pixel/events/properties/auto-captured">
  See all click IDs (Meta, Google, TikTok, Pinterest, Snapchat, AppLovin, LinkedIn, Microsoft, Reddit, and more), UTM parameters, and context fields.
</Card>
