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

# Event Parameters Reference

> Every parameter you can send with an Upstack Data event: standard parameters, items, user data and custom data.

Everything you send with an event goes in one object, the `eventData` argument of `track()`. That object has three kinds of keys:

| Section | What it holds | Examples |
| - | - | - |
| [Standard parameters](#standard-parameters) | Keys Upstack recognizes and maps to destinations | `value`, `currency`, `items`, `orderId` |
| [User data](#user-data) | Who did it | `email`, `phone`, `firstName`, `lastName` |
| [Custom data](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/custom-data.md) | Your own keys | `loyaltyTier`, `quiz_id` |

Sample payload with every standard parameter, item parameter, user data parameter and address parameter on a `purchase`:

```javascript theme={null}
window._upstack('track', 'purchase', {
  // Standard parameters
  orderId: '10421',
  transactionId: '10421',
  orderName: '#1042',
  value: 81.17,
  price: 81.17,
  currency: 'USD',
  subtotalPrice: 62.98,
  tax: 5.20,
  shipping: 12.99,
  discount: 7.00,
  coupon: 'SAVE10',
  paymentType: 'credit_card',
  shippingTier: 'Express',
  affiliation: 'Example Store',
  items: [{
    id: '8012345678',
    variant: '44120033',
    variantName: 'Blue / Medium',
    name: 'Classic Cotton Tee',
    sku: 'TEE-BLU-M',
    price: 34.99,
    quantity: 2,
    brand: 'Example Brand',
    category: 'Apparel',
    url: 'https://example.com/products/classic-tee',
    imageUrl: 'https://example.com/images/classic-tee.jpg',
    discount: 3.50,
    value: 69.98,
    content_type: 'product'
  }],

  // User data
  email: 'jane@example.com',
  phone: '+15551234567',
  firstName: 'Jane',
  lastName: 'Smith',
  addresses: [{
    firstName: 'Jane',
    lastName: 'Smith',
    company: 'Example Co',
    address1: '123 Main St',
    address2: 'Apt 4B',
    city: 'Austin',
    province: 'Texas',
    provinceCode: 'TX',
    country: 'United States',
    countryCode: 'US',
    zip: '78701',
    phone: '+15551234567'
  }],

  // Custom data
  salesChannel: 'web',
  loyaltyTier: 'gold'
});
```

These parameters only apply to some events: [`cartId`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/cart-id), [`searchTerm`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/search-term), [`categoryId` and `category`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/category) and [`formId`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/form-id).

## Rules for all parameters

* Send numbers as numbers and IDs as strings. The Events API rejects `value: "12"` and a numeric `id`. Google Ads and Microsoft Ads ignore a `value` sent as a string.
* Money is in major units (`34.99`, not `3499`). The exceptions are the SaaS parameters `mrr`, `arr`, `mrrDelta`, `ltv` and `amount`, which are in cents.
* Use the key names exactly as listed. Upstack doesn't convert other spellings, such as `order_id` for `orderId`.
* Upstack doesn't calculate totals. Send `value` yourself.

## Standard parameters

Each event page shows which of these it uses and which are required. [SaaS events](https://docs.upstackdata.com/event-tracking/event-taxonomy/saas-events) add their own [SaaS parameters](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/saas.md).

| Name | Type | Description |
| - | - | - |
| [`value`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/value) | `number` | Monetary value of the event, in major units. |
| [`currency`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/currency) | `string` | ISO 4217 currency code. |
| [`items`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/items) | `Array<Item>` | The products in the event. |
| [`orderId`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/transaction-id) | `string` | Your order ID. |
| [`transactionId`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/transaction-id) | `string` | Same value as `orderId`. Send it on `purchase` only. |
| [`orderName`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/order-name) | `string` | The order number your customer sees. |
| [`price`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/price) | `number` | Order total. Same as `value`. |
| [`subtotalPrice`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/subtotal-price) | `number` | Total after discounts, before tax and shipping. |
| [`tax`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/tax) | `number` | Tax amount. |
| [`shipping`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/shipping) | `number` | Shipping cost. |
| [`discount`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/discount) | `number` | Total discount amount. |
| [`coupon`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/coupon) | `string` | Discount code used. |
| [`paymentType`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/payment-type) | `string` | Payment method. Never send card details. |
| [`shippingTier`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/shipping-tier) | `string` | Shipping method chosen. |
| [`cartId`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/cart-id) | `string` | Your cart ID. |
| [`searchTerm`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/search-term) | `string` | The search query. |
| [`categoryId`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/category) | `string` | Your category or collection ID. |
| [`category`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/category) | `string` | Category or collection name. |
| [`formId`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/form-id) | `string` | Your form ID. |
| [`affiliation`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/affiliation) | `string` | Your store or affiliate name. |

## Item parameters

| Name | Type | Required | Example value | Description |
| - | - | - | - | - |
| `id` | `string` | Yes | `8012345678` | Product ID. Must match the ID in your product catalogs. |
| `name` | `string` | Yes | `Classic Cotton Tee` | Product name. |
| `price` | `number` | Yes | `34.99` | Unit price. |
| `quantity` | `number` | Yes | `2` | Quantity. |
| `variant` | `string` | No | `44120033` | Variant ID, not a name. Must match your catalogs. |
| `variantName` | `string` | No | `Blue / Medium` | Variant name. |
| `sku` | `string` | No | `TEE-BLU-M` | SKU. |
| `brand` | `string` | No | `Example Brand` | Brand. |
| `category` | `string` | No | `Apparel` | Product category. |
| `url` | `string` | No | `https://example.com/products/classic-tee` | Product page URL. |
| `imageUrl` | `string` | No | `https://example.com/images/classic-tee.jpg` | Product image URL. |
| `discount` | `number` | No | `3.50` | Discount on this line. |
| `value` | `number` | No | `69.98` | Line total. |
| `content_type` | `string` | No | `product` | `product` or `product_group`. |

## User data

Each event page shows one of these two tables.

**When the person may be anonymous**, such as browse, cart and `initiate_checkout` events:

| Name | Type | Required | Example value | Description |
| - | - | - | - | - |
| [`email`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/email) | `string` | Yes\* | `jane@example.com` | Email address. |
| [`phone`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/phone) | `string` | Yes\* | `+15551234567` | Phone number in E.164 format. |
| [`firstName`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/name) | `string` | No | `Jane` | First name. |
| [`lastName`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/name) | `string` | No | `Smith` | Last name. |

\* Required once you know it.

**When you know who the person is**, such as later checkout steps, order and lead events:

| Name | Type | Required | Example value | Description |
| - | - | - | - | - |
| [`email`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/email) | `string` | Yes | `jane@example.com` | Email address. |
| [`phone`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/phone) | `string` | Yes\* | `+15551234567` | Phone number in E.164 format. |
| [`firstName`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/name) | `string` | Yes\* | `Jane` | First name. |
| [`lastName`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/name) | `string` | Yes\* | `Smith` | Last name. |
| [`addresses`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/address) | `Array<Address>` | No | [See address parameters](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/address.md) | Shipping and billing addresses. |

\* Required if you have it.

More detail: [User data](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/customer).

## Custom data

Any key that isn't listed above is custom data, such as `loyaltyTier: 'gold'`. See [Custom data](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/custom-data.md) for what you can do with it.

## Event IDs

Leave the event ID to Upstack. It uses the ID to remove duplicates, and it drops any event whose ID it has already seen in the last 30 days. `page_view`, `view_content`, `view_category` and `view_cart` are exempt.

* `purchase` gets the ID `pixelId_orderId`. That's how the browser and server copies of an order count as one.
* Send `transactionId` on `purchase` only. Any other event that carries it gets the same ID as the purchase.
* To send your own ID, for example so repeat page loads count once, pass it as the third argument of [`track()`](https://docs.upstackdata.com/pixel/javascript-sdk#track-eventname-eventdata). Don't do this on `purchase`.

## Sending events from your server

Send the same object as `eventProperties` in a [`POST /tr/api/events`](https://docs.upstackdata.com/api-reference/events/send-events-via-upstack-conversion-api) request, but put the email and phone in `userProperties`, as `emails` and `phones` arrays. On this API, only `userProperties` links the event to a person.

```json theme={null}
{
  "events": [{
    "name": "purchase",
    "eventId": "YOUR_PIXEL_ID_10421",
    "userProperties": { "emails": ["jane@example.com"] },
    "eventProperties": {
      "orderId": "10421",
      "transactionId": "10421",
      "value": 81.17,
      "currency": "USD",
      "items": [{ "id": "8012345678", "name": "Classic Cotton Tee", "price": 34.99, "quantity": 2 }]
    }
  }]
}
```

## What Upstack captures for you

Upstack captures the page URL, referrer, UTM parameters, click IDs, device, location and timestamp on every browser event. See [Auto-captured fields](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/auto-captured.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.