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

# Custom Data

> Send your own keys with any event, and use them in PostHog, Slack, event mappings and value formulas.

Custom data is any key that isn't a standard parameter or user data. You choose the name, and it goes in the same object as everything else. Each event page lists examples.

Sample payload with custom data of each type:

```javascript theme={null}
window._upstack('track', 'purchase', {
  // Standard parameters
  orderId: '10421',
  transactionId: '10421',
  value: 81.17,
  currency: 'USD',
  items: [{ id: '8012345678', name: 'Classic Cotton Tee', price: 34.99, quantity: 2 }],

  // User data
  email: 'jane@example.com',

  // Custom data
  loyaltyTier: 'gold',                       // string
  leadValue: 40,                             // number
  giftOrder: false,                          // boolean
  promoCodes: ['SAVE10', 'FREESHIP'],        // array
  referral: { partner: 'acme', tier: 2 }     // object
});
```

## Where can I use custom data?

This uses the `loyaltyTier` and `leadValue` keys from the sample above.

| Where | How to use it | Example |
| - | - | - |
| [PostHog](https://docs.upstackdata.com/destinations/catalog/posthog.md) | It arrives as an event property under the same name | Filter a PostHog insight by `loyaltyTier` |
| [Slack messages](https://docs.upstackdata.com/destinations/catalog/slack.md) | Add a placeholder to your message template | `Order from a {{data.loyaltyTier}} member` |
| [Event mapping conditions](https://docs.upstackdata.com/guides/custom-events/global-event-mappings.md) | Use the key as the condition field | `data.loyaltyTier` equals `gold`, to create a `gold_member_purchase` event |
| [Value formulas](https://docs.upstackdata.com/guides/custom-events/value-and-formulas.md) | Use the key in a custom formula | `data.leadValue * 0.4` |

## Which destinations receive custom data?

Only PostHog and Slack. Meta, TikTok, Google Ads, Klaviyo and other ad and email platforms receive standard parameters only.

To get a custom value to one of those platforms, use a [value formula](https://docs.upstackdata.com/guides/custom-events/value-and-formulas.md) to send it as the event value, or an [event mapping condition](https://docs.upstackdata.com/guides/custom-events/global-event-mappings.md) to send a separate event.

## How do I name custom keys?

* Use one style across your events, such as `loyaltyTier`.
* Don't reuse a [standard parameter](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties#standard-parameters) name for your own data. `value` always means the event value.
* Keep the same key and type on every event. A key that's a number on one event and a string on another won't work in a value formula.

## Can I put email addresses in custom keys?

No. Use [user data](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/customer), which is hashed before it's sent to ad platforms. PostHog receives custom keys exactly as you send them.


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