# evaluateExperiences

**Kind:** Function

**Source:** [`atloria-monorepo/apps/api/src/tours/tour-targeting.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/api/src/tours/tour-targeting.ts#L136)

Server-side evaluation for the public config endpoint: keep only LIVE
experiences whose URL rules and segments match, ordered by priority (desc)
then age (oldest first — stable, deterministic).

## Signature

```ts
function evaluateExperiences(experiences: T[], ctx: { url: string; segments?: string[] }): T[]
```

## Parameters

| Name | Type |
|---|---|
| `experiences` | `T[]` |
| `ctx` | `{ url: string; segments?: string[] }` |

**Returns:** `T[]`
