Skip to content

attrsToSegments

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/apps/api/src/tours/tour-targeting.ts

D4 — flatten VERIFIED reader attrs (from the signed reader token, never a host-declared string) into targetable segment strings. Each primitive value yields both a bare segment (enterprise) and a namespaced one (plan:enterprise) so an owner can target either; array values expand element-wise. This is what segment rules evaluate against once a reader has a verified identity — a spoofed data-segments can no longer grant a targeted experience.

Signature

ts
function attrsToSegments(attrs: Record<string, unknown> | null | undefined): string[]

Parameters

NameType
attrs`Record<string, unknown>

Returns: string[]

Was this page helpful?

Download as PDF