# clampTimeOnPage

**Kind:** Function

**Source:** [`atloria-monorepo/apps/api/src/analytics/utils/tracking-utils.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/api/src/analytics/utils/tracking-utils.ts#L37)

Clamp a raw time-on-page value to a reasonable upper bound and floor at 0.
Returns null if the input is null/undefined so the column stays nullable.

## Signature

```ts
function clampTimeOnPage(timeOnPage: number | null | undefined): number | null
```

## Parameters

| Name | Type |
|---|---|
| `timeOnPage` | `number | null | undefined` |

**Returns:** `number | null`
