Skip to content

clampTimeOnPage

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/apps/api/src/analytics/utils/tracking-utils.ts

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

NameType
timeOnPage`number

Returns: number | null

Was this page helpful?

Download as PDF