From 36b8f5303f1d0731d03b791a842fe3128844d5b4 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Tue, 9 Jan 2024 09:29:55 +0000 Subject: [PATCH] fix: add a comment explaining browser type prop (#952) --- src/posthog-core.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/posthog-core.ts b/src/posthog-core.ts index 4647f9bf0..1d4e1bcb7 100644 --- a/src/posthog-core.ts +++ b/src/posthog-core.ts @@ -994,6 +994,8 @@ export class PostHog { properties['$duration'] = parseFloat((duration_in_ms / 1000).toFixed(3)) } + // this is only added when this.config.opt_out_useragent_filter is true, + // or it would always add "browser" if (userAgent && this.config.opt_out_useragent_filter) { properties['$browser_type'] = _isBlockedUA(userAgent, this.config.custom_blocked_useragents) ? 'bot'