:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
export const ValidRetentionPeriods = ['30d', '90d', '1y', '5y'] as const
export type RetentionPeriod = (typeof ValidRetentionPeriods)[number]
export function isValidRetentionPeriod(retentionPeriod: string): retentionPeriod is RetentionPeriod {
return ValidRetentionPeriods.includes(retentionPeriod as RetentionPeriod)
}
export const RetentionPeriodToDaysMap: { [key in RetentionPeriod]: number } = {
'30d': 30,
'90d': 90,
'1y': 365,
'5y': 1825,
}