import { METRIC_TYPE } from './' ; export interface UserAgentMetric { type : METRIC_TYPE . USER_AGENT ; appName : string ; userAgent : string ; } export function trackUsageAgent ( appName ) { const userAgent = ( window && window . navigator && window . navigator . userAgent ) || '' ; return { type : METRIC_TYPE . USER_AGENT , appName , userAgent , } ; }