From 3ed4475de495f63e433f9ecbd107aa1d0e85f10f Mon Sep 17 00:00:00 2001 From: TZGyn Date: Thu, 2 May 2024 10:10:02 +0800 Subject: [PATCH] update analytics to treat unknown device type as desktop --- redirect/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redirect/src/index.ts b/redirect/src/index.ts index 12e8a07..1a7c4d7 100644 --- a/redirect/src/index.ts +++ b/redirect/src/index.ts @@ -42,7 +42,7 @@ app.get( country_code: geolocation.data.location.country .alpha2 as string, city: geolocation.data.location.city.name as string, - device_type: ua_parser.getDevice().type, + device_type: ua_parser.getDevice().type || 'desktop', device_vendor: ua_parser.getDevice().vendor, browser: ua_parser.getBrowser().name, os: ua_parser.getOS().name,