Skip to content

Commit

Permalink
fix: add a comment explaining browser type prop (#952)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra authored Jan 9, 2024
1 parent 6769361 commit 36b8f53
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/posthog-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 36b8f53

Please sign in to comment.