Kind: Function
Source: atloria-monorepo/apps/api/src/analytics/utils/tracking-utils.ts
Derive a coarse device class from the user-agent string. Order matters: we check mobile first (since "Android Mobile" includes both keywords), then tablet, then desktop, then fall back to unknown.
Signature
tsfunction parseDevice(userAgent: string | null | undefined): DeviceClass
Parameters
| Name | Type |
|---|---|
userAgent | `string |
Returns: DeviceClass
Was this page helpful?