Skip to content

hourBucketStart

reference
1 min readUpdated

Kind: Function

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

Compute the start of the hour bucket containing date. Used by the session-dedup logic in the analytics service so that multiple page-view beacons from the same session+slug within the same hour collapse into a single row instead of stacking up.

Signature

ts
function hourBucketStart(date: Date): Date

Parameters

NameType
dateDate

Returns: Date

Was this page helpful?

Download as PDF