Skip to content

isBot

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/apps/api/src/analytics/utils/tracking-utils.ts

Returns true if the given user-agent string looks like a bot/crawler/automation tool. Empty strings are treated as bots — a real browser always sends a UA.

Signature

ts
function isBot(userAgent: string | null | undefined): boolean

Parameters

NameType
userAgent`string

Returns: boolean

Was this page helpful?

Download as PDF