# Page context

> Tell agents and triage where the contact is in your product: the plan, the cart, the current order.

## Set page context

Call `Iris.setPageContext` when the page loads, and again when the facts change. Each call replaces the earlier page context. Iris keeps only the latest one for the conversation, and adds the page `url` and `title` itself.

```js title="app.js"
Iris.setPageContext({
  plan: "pro",
  cartTotal: 42.5,
  beta: true,
  coupon: null,
});
```

## Limits

- A flat object: no nested objects or arrays.
- Up to 48 of your own keys. Iris adds `url` and `title`, 50 in all. A key has up to 64 characters.
- Each value is a string of up to 500 characters, a number, a boolean or `null`.

Every limit is also in [`Iris.setPageContext`](/reference/methods/#set-page-context).

> **Iris does not check page context**
>
> The browser sets page context, so it may be wrong. For facts you must trust, such as the plan the
> user pays for, use contact attributes in the [identity
> token](/reference/identity-token-claims/#claim-attributes).
