@shware/analytics 8.15.0 → 8.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/attribution/classify.cjs +15 -3
- package/dist/attribution/classify.cjs.map +1 -1
- package/dist/attribution/classify.d.cts +2 -1
- package/dist/attribution/classify.d.cts.map +1 -1
- package/dist/attribution/classify.d.mts +2 -1
- package/dist/attribution/classify.d.mts.map +1 -1
- package/dist/attribution/classify.mjs +15 -3
- package/dist/attribution/classify.mjs.map +1 -1
- package/dist/attribution/vocabulary.cjs +100 -19
- package/dist/attribution/vocabulary.cjs.map +1 -1
- package/dist/attribution/vocabulary.d.cts +16 -4
- package/dist/attribution/vocabulary.d.cts.map +1 -1
- package/dist/attribution/vocabulary.d.mts +16 -4
- package/dist/attribution/vocabulary.d.mts.map +1 -1
- package/dist/attribution/vocabulary.mjs +100 -19
- package/dist/attribution/vocabulary.mjs.map +1 -1
- package/dist/bot/index.cjs +39 -1
- package/dist/bot/index.cjs.map +1 -1
- package/dist/bot/index.d.cts +3 -2
- package/dist/bot/index.d.cts.map +1 -1
- package/dist/bot/index.d.mts +3 -2
- package/dist/bot/index.d.mts.map +1 -1
- package/dist/bot/index.mjs +39 -1
- package/dist/bot/index.mjs.map +1 -1
- package/dist/schema/index.cjs +3 -1
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.d.cts +18 -6
- package/dist/schema/index.d.cts.map +1 -1
- package/dist/schema/index.d.mts +18 -6
- package/dist/schema/index.d.mts.map +1 -1
- package/dist/schema/index.mjs +3 -1
- package/dist/schema/index.mjs.map +1 -1
- package/dist/server/openai-conversions-api.cjs +1 -0
- package/dist/server/openai-conversions-api.cjs.map +1 -1
- package/dist/server/openai-conversions-api.d.cts.map +1 -1
- package/dist/server/openai-conversions-api.d.mts.map +1 -1
- package/dist/server/openai-conversions-api.mjs +1 -0
- package/dist/server/openai-conversions-api.mjs.map +1 -1
- package/dist/track/types.d.cts +3 -1
- package/dist/track/types.d.cts.map +1 -1
- package/dist/track/types.d.mts +3 -1
- package/dist/track/types.d.mts.map +1 -1
- package/dist/web/index.cjs +3 -1
- package/dist/web/index.cjs.map +1 -1
- package/dist/web/index.d.cts.map +1 -1
- package/dist/web/index.d.mts.map +1 -1
- package/dist/web/index.mjs +3 -1
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/page-key.cjs +4 -2
- package/dist/web/page-key.cjs.map +1 -1
- package/dist/web/page-key.d.cts.map +1 -1
- package/dist/web/page-key.d.mts.map +1 -1
- package/dist/web/page-key.mjs +4 -2
- package/dist/web/page-key.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -69,6 +69,7 @@ const SOURCE_ALIASES = {
|
|
|
69
69
|
ig: "meta",
|
|
70
70
|
an: "meta",
|
|
71
71
|
msg: "meta",
|
|
72
|
+
th: "meta",
|
|
72
73
|
facebook: "meta",
|
|
73
74
|
instagram: "meta",
|
|
74
75
|
bing: "microsoft",
|
|
@@ -87,27 +88,107 @@ const SOURCE_ALIASES = {
|
|
|
87
88
|
"kimi.com": "kimi"
|
|
88
89
|
};
|
|
89
90
|
/**
|
|
90
|
-
* Which click id belongs to which channel, in priority order
|
|
91
|
-
*
|
|
92
|
-
*
|
|
91
|
+
* Which click id belongs to which channel, in priority order, and whether the platform puts it on
|
|
92
|
+
* its ad clicks only (`'ads'`) or on other links as well (`'any'`). Every key is a field this SDK
|
|
93
|
+
* collects (`AdvertisingInfo`).
|
|
94
|
+
*
|
|
95
|
+
* The third column decides whether the id can say a click was paid when a `utm_source` names the
|
|
96
|
+
* channel but no `utm_medium` says how (a Reddit ad tagged `utm_source=reddit` and nothing more).
|
|
97
|
+
* `fbclid` is `'any'`: Meta decorates every outbound link with it, organic posts, profile links
|
|
98
|
+
* and shares included. `twclid` and `ko_click_id` are `'any'` until it is clear they never
|
|
99
|
+
* decorate an organic link.
|
|
100
|
+
*
|
|
101
|
+
* Deliberately absent: `fbp` and `rdt_uuid`, pixel browser ids present with or without a click;
|
|
102
|
+
* and `fbc`, which the SDK only ever reads from the `_fbc` cookie. That cookie lives 90 days after
|
|
103
|
+
* a Meta click, so counting it named every later visit — typed in, from search, from an email — a
|
|
104
|
+
* new Meta click. `fbclid` is read from the landing URL only, so it is this visit's click.
|
|
93
105
|
*/
|
|
94
106
|
const CLICK_ID_CHANNELS = [
|
|
95
|
-
[
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
[
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
[
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
[
|
|
107
|
+
[
|
|
108
|
+
"fbclid",
|
|
109
|
+
"meta",
|
|
110
|
+
"any"
|
|
111
|
+
],
|
|
112
|
+
[
|
|
113
|
+
"gclid",
|
|
114
|
+
"google",
|
|
115
|
+
"ads"
|
|
116
|
+
],
|
|
117
|
+
[
|
|
118
|
+
"gbraid",
|
|
119
|
+
"google",
|
|
120
|
+
"ads"
|
|
121
|
+
],
|
|
122
|
+
[
|
|
123
|
+
"wbraid",
|
|
124
|
+
"google",
|
|
125
|
+
"ads"
|
|
126
|
+
],
|
|
127
|
+
[
|
|
128
|
+
"gad_source",
|
|
129
|
+
"google",
|
|
130
|
+
"ads"
|
|
131
|
+
],
|
|
132
|
+
[
|
|
133
|
+
"gad_campaignid",
|
|
134
|
+
"google",
|
|
135
|
+
"ads"
|
|
136
|
+
],
|
|
137
|
+
[
|
|
138
|
+
"dclid",
|
|
139
|
+
"dv360",
|
|
140
|
+
"ads"
|
|
141
|
+
],
|
|
142
|
+
[
|
|
143
|
+
"msclkid",
|
|
144
|
+
"microsoft",
|
|
145
|
+
"ads"
|
|
146
|
+
],
|
|
147
|
+
[
|
|
148
|
+
"ttclid",
|
|
149
|
+
"tiktok",
|
|
150
|
+
"ads"
|
|
151
|
+
],
|
|
152
|
+
[
|
|
153
|
+
"rdt_cid",
|
|
154
|
+
"reddit",
|
|
155
|
+
"ads"
|
|
156
|
+
],
|
|
157
|
+
[
|
|
158
|
+
"li_fat_id",
|
|
159
|
+
"linkedin",
|
|
160
|
+
"ads"
|
|
161
|
+
],
|
|
162
|
+
[
|
|
163
|
+
"ScCid",
|
|
164
|
+
"snapchat",
|
|
165
|
+
"ads"
|
|
166
|
+
],
|
|
167
|
+
[
|
|
168
|
+
"twclid",
|
|
169
|
+
"x",
|
|
170
|
+
"any"
|
|
171
|
+
],
|
|
172
|
+
[
|
|
173
|
+
"ko_click_id",
|
|
174
|
+
"kakao",
|
|
175
|
+
"any"
|
|
176
|
+
],
|
|
177
|
+
[
|
|
178
|
+
"yclid",
|
|
179
|
+
"yandex",
|
|
180
|
+
"ads"
|
|
181
|
+
],
|
|
182
|
+
[
|
|
183
|
+
"oppref",
|
|
184
|
+
"chatgpt",
|
|
185
|
+
"ads"
|
|
186
|
+
],
|
|
187
|
+
[
|
|
188
|
+
"epik",
|
|
189
|
+
"pinterest",
|
|
190
|
+
"ads"
|
|
191
|
+
]
|
|
111
192
|
];
|
|
112
193
|
/**
|
|
113
194
|
* A landing page reserved for one channel's ads, for ads that lost their parameters:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vocabulary.mjs","names":[],"sources":["../../src/attribution/vocabulary.ts"],"sourcesContent":["import type { AdvertisingInfo } from '../track/types';\n\n/**\n * The vocabulary attribution is built from, shared by every product's `session` table and by the\n * dashboards that read it. Data for `classifyTouch` (./classify), which turns it into a channel;\n * a product's dashboards read the same names back. What stays with the product is its own hostnames\n * (referrer exclusions) and its landing-page conventions.\n */\n\n/** A session that arrived through nothing we can name. GA's spelling, so dashboards read as GA. */\nexport const DIRECT_CHANNEL = '(direct)';\n/** The medium of a direct session. */\nexport const NO_MEDIUM = '(none)';\n/** The medium of a tagged link that named a source but no medium. */\nexport const MEDIUM_NOT_SET = '(not set)';\n\n/** The channels the rules below can name. A `utm_source` outside this list is its own channel. */\nexport const CHANNELS = [\n 'meta',\n 'google',\n 'dv360',\n 'microsoft',\n 'tiktok',\n 'reddit',\n 'linkedin',\n 'snapchat',\n 'x',\n 'kakao',\n 'yandex',\n 'yahoo',\n 'duckduckgo',\n 'baidu',\n 'ecosia',\n 'naver',\n 'brave',\n 'pinterest',\n 'youtube',\n /** AI assistants that send people to sites: ChatGPT tags its links `utm_source=chatgpt.com`, the\n * others show as a referrer. Their own channel group, `organic_ai`, since GA4's default groups\n * would file them under Referral / Unassigned and the question \"how much does AI bring\" comes up. */\n 'chatgpt',\n 'perplexity',\n 'gemini',\n 'claude',\n 'copilot',\n 'grok',\n /** and the Chinese ones — DeepSeek, 豆包, Kimi, 通义, 腾讯元宝, 文心一言, 智谱清言 */\n 'deepseek',\n 'doubao',\n 'kimi',\n 'qwen',\n 'yuanbao',\n 'ernie',\n 'zhipu',\n /** the product's own referral programme: the session came through a member's link or code.\n * How a product recognises one (a `/refer/<code>` path, a code at sign-up) is its own rule. Not\n * `referral`: that word is the channel group of any outside site, and a channel of the same name\n * would be impossible to tell apart in queries. */\n 'referral_program',\n] as const;\n\nexport type Channel = (typeof CHANNELS)[number];\n\n/** GA4's default channel groups, as identifiers; a dashboard maps them to display names. */\nexport const CHANNEL_GROUPS = [\n 'direct',\n 'paid_search',\n 'paid_social',\n 'paid_other',\n 'display',\n 'organic_search',\n 'organic_social',\n 'organic_video',\n /** not in GA4's default grouping: sessions an AI assistant sent, by referrer or by ChatGPT's utm */\n 'organic_ai',\n 'referral',\n 'email',\n 'affiliate',\n 'unassigned',\n] as const;\n\nexport type ChannelGroup = (typeof CHANNEL_GROUPS)[number];\n\n/** `utm_source` spellings that mean the same channel: Meta's `{{site_source_name}}` values and the usual synonyms. */\nexport const SOURCE_ALIASES = {\n fb: 'meta',\n ig: 'meta',\n an: 'meta',\n msg: 'meta',\n facebook: 'meta',\n instagram: 'meta',\n bing: 'microsoft',\n twitter: 'x',\n 'google ads': 'google',\n googleads: 'google',\n adwords: 'google',\n 'chatgpt.com': 'chatgpt',\n 'chat.openai.com': 'chatgpt',\n openai: 'chatgpt',\n 'perplexity.ai': 'perplexity',\n 'claude.ai': 'claude',\n 'copilot.com': 'copilot',\n 'deepseek.com': 'deepseek',\n 'doubao.com': 'doubao',\n 'kimi.com': 'kimi',\n} as const satisfies Record<string, Channel>;\n\n/**\n * Which click id belongs to which channel, in priority order. Every key is a field this SDK\n * collects (`AdvertisingInfo`); `fbp` and `rdt_uuid` are deliberately absent — they are pixel\n * browser ids, present with or without a click.\n */\nexport const CLICK_ID_CHANNELS = [\n ['fbclid', 'meta'],\n ['fbc', 'meta'],\n ['gclid', 'google'],\n ['gbraid', 'google'],\n ['wbraid', 'google'],\n ['gad_source', 'google'],\n ['gad_campaignid', 'google'],\n ['dclid', 'dv360'],\n ['msclkid', 'microsoft'],\n ['ttclid', 'tiktok'],\n ['rdt_cid', 'reddit'],\n ['li_fat_id', 'linkedin'],\n ['sccid', 'snapchat'],\n ['twclid', 'x'],\n ['ko_click_id', 'kakao'],\n ['yclid', 'yandex'],\n] as const satisfies readonly (readonly [keyof AdvertisingInfo, Channel])[];\n\n/**\n * A landing page reserved for one channel's ads, for ads that lost their parameters:\n * `/lp/<channel>`, with or without host, query and hash; the capture is the channel. A product\n * that names its landing pages differently replaces this.\n */\nexport const AD_LANDING_PAGE = /^(?:https?:\\/\\/[^/]+)?\\/lp\\/([a-z]+)(?:[/?#]|$)/;\n\nexport type ReferrerMedium = 'organic' | 'social' | 'video' | 'ai';\n\n/**\n * Referrer hosts that name a channel, as regular expressions over the lower-cased host,\n * with the medium GA4 gives that kind of site. Anything else that refers is `referral`, kept as\n * its host. A country TLD is one or two labels (`google.com`, `google.co.uk`, `google.com.hk`),\n * never an open tail, so `google.com.evil.io` is not Google. In match order: the AI assistants\n * first, because `gemini.google.com`, `copilot.microsoft.com` and `yiyan.baidu.com` would\n * otherwise be Google, Microsoft and Baidu search.\n */\nexport const REFERRER_SITES = [\n ['chatgpt', 'ai', /(^|\\.)(chatgpt\\.com|chat\\.openai\\.com)$/],\n ['perplexity', 'ai', /(^|\\.)perplexity\\.ai$/],\n ['gemini', 'ai', /^gemini\\.google\\.com$/],\n ['claude', 'ai', /(^|\\.)claude\\.ai$/],\n ['copilot', 'ai', /^copilot\\.microsoft\\.com$|(^|\\.)copilot\\.com$/],\n ['grok', 'ai', /(^|\\.)(grok\\.com|x\\.ai)$/],\n ['deepseek', 'ai', /(^|\\.)deepseek\\.com$/],\n ['doubao', 'ai', /(^|\\.)doubao\\.com$/],\n ['kimi', 'ai', /(^|\\.)(kimi\\.com|kimi\\.moonshot\\.cn|moonshot\\.cn)$/],\n ['qwen', 'ai', /^tongyi\\.aliyun\\.com$|(^|\\.)(tongyi\\.com|qianwen\\.com|qwen\\.ai)$/],\n ['yuanbao', 'ai', /^yuanbao\\.tencent\\.com$/],\n ['ernie', 'ai', /^yiyan\\.baidu\\.com$|(^|\\.)ernie\\.baidu\\.com$/],\n ['zhipu', 'ai', /(^|\\.)(chatglm\\.cn|zhipuai\\.cn|bigmodel\\.cn)$/],\n ['google', 'organic', /(^|\\.)google\\.[a-z]{2,}(\\.[a-z]{2,3})?$/],\n ['microsoft', 'organic', /(^|\\.)bing\\.com$/],\n ['yahoo', 'organic', /(^|\\.)yahoo\\.[a-z]{2,}(\\.[a-z]{2,3})?$/],\n ['duckduckgo', 'organic', /(^|\\.)duckduckgo\\.com$/],\n ['baidu', 'organic', /(^|\\.)baidu\\.com$/],\n ['yandex', 'organic', /(^|\\.)yandex\\.[a-z]{2,}(\\.[a-z]{2,3})?$/],\n ['ecosia', 'organic', /(^|\\.)ecosia\\.org$/],\n ['naver', 'organic', /(^|\\.)naver\\.com$/],\n ['brave', 'organic', /^search\\.brave\\.com$/],\n ['meta', 'social', /(^|\\.)(facebook\\.com|instagram\\.com|fb\\.com|threads\\.net)$/],\n ['x', 'social', /(^|\\.)(twitter\\.com|x\\.com|t\\.co)$/],\n ['linkedin', 'social', /(^|\\.)(linkedin\\.com|lnkd\\.in)$/],\n ['reddit', 'social', /(^|\\.)reddit\\.com$/],\n ['tiktok', 'social', /(^|\\.)tiktok\\.com$/],\n ['pinterest', 'social', /(^|\\.)pinterest\\.[a-z]{2,}(\\.[a-z]{2,3})?$/],\n ['snapchat', 'social', /(^|\\.)snapchat\\.com$/],\n ['youtube', 'video', /(^|\\.)(youtube\\.com|youtu\\.be)$/],\n] as const satisfies readonly (readonly [Channel, ReferrerMedium, RegExp])[];\n\n/**\n * Referrer hosts that are navigation, not acquisition, when a session happens to start on the way\n * back from them: the local dev host; the payment providers a visitor is bounced through; the\n * sign-in providers whose login lives on a host of its own (Google, Apple, Microsoft, WeChat,\n * Kakao, LINE, Naver, Yahoo, Twitch, X's OAuth 1.0a endpoint); and the hosted auth services a\n * product may sit behind (Auth0, Okta, Supabase, Firebase, Clerk). A product appends its own\n * hostnames — a session that starts from an internal link after the session timeout refers to\n * them. Matched before `REFERRER_SITES`, so `nid.naver.com` and `login.yahoo.com` are not read as\n * a search. Providers whose login shares the host with their content — Facebook, X's OAuth 2.0,\n * LinkedIn, GitHub, Discord — cannot be told apart by host (referrer policies strip the path) and\n * are left as the referrers they usually are. Regular expressions over the lower-cased host.\n */\nexport const REFERRERS_NOT_A_TOUCH = [\n /^localhost(:|$)/,\n // payment\n /(^|\\.)stripe\\.com$/,\n /^pay\\.google\\.com$/,\n /(^|\\.)paypal\\.com$/,\n /(^|\\.)alipay\\.com$/,\n /(^|\\.)paddle\\.com$/,\n /(^|\\.)lemonsqueezy\\.com$/,\n // app stores\n /^apps\\.apple\\.com$/,\n /^play\\.google\\.com$/,\n // sign-in providers with a login host of their own\n /^accounts\\.google\\.com$/,\n /^appleid\\.apple\\.com$/,\n /^login\\.(microsoftonline|live)\\.com$/,\n /^open\\.weixin\\.qq\\.com$/,\n /^(kauth|accounts)\\.kakao\\.com$/,\n /^access\\.line\\.me$/,\n /^nid\\.naver\\.com$/,\n /^login\\.yahoo\\.com$/,\n /^id\\.twitch\\.tv$/,\n /^api\\.twitter\\.com$/,\n // hosted auth services\n /(^|\\.)auth0\\.com$/,\n /(^|\\.)okta\\.com$/,\n /(^|\\.)supabase\\.co$/,\n /(^|\\.)firebaseapp\\.com$/,\n /(^|\\.)clerk\\.accounts\\.dev$/,\n] as const;\n\n/** GA4's paid mediums — cpc, cpm, ppc, retargeting, paid_social, … — plus Performance Max. */\nexport const PAID_MEDIUM = /^(.*cp.*|ppc|retargeting|paid.*|pmax|performance_max)$/;\n/**\n * Meta's `{{placement}}` values, lower-cased, which an ad URL template of `utm_medium={{placement}}`\n * puts in the medium. Only an ad carries one — an organic post arrives as a referrer, with no utm\n * at all — so a medium in this list is a paid Meta click whatever the source says (a template with\n * `utm_source=meta-websitekeyinfo` was seen). Listed one by one rather than matched by prefix, so\n * that a hand-tagged `instagram_stories` post cannot be mistaken for an ad only because of how it\n * is spelled … which means a placement Meta adds later shows up as unassigned until it is added\n * here. Meta's documented values plus the ones seen in the wild (`facebook_mobile_reels`,\n * `facebook_notification`, `an`), and the literal macro for a template that did not expand it.\n */\nexport const META_PLACEMENTS = [\n 'facebook_desktop_feed',\n 'facebook_mobile_feed',\n 'facebook_mobile_reels',\n 'facebook_reels',\n 'facebook_reels_overlay',\n 'facebook_right_column',\n 'facebook_marketplace',\n 'facebook_video_feeds',\n 'facebook_stories',\n 'facebook_search',\n 'facebook_instream_video',\n 'facebook_instant_article',\n 'facebook_groups_feed',\n 'facebook_profile_feed',\n 'facebook_notification',\n 'facebook_notifications',\n 'facebook_business_explore',\n 'instagram_feed',\n 'instagram_stories',\n 'instagram_reels',\n 'instagram_reels_overlay',\n 'instagram_explore',\n 'instagram_explore_home',\n 'instagram_search',\n 'instagram_shop',\n 'instagram_profile_feed',\n 'instagram_profile_reels',\n 'instagram_igtv',\n 'messenger_inbox',\n 'messenger_stories',\n 'messenger_sponsored_messages',\n 'threads_feed',\n 'whatsapp_status',\n 'audience_network_classic',\n 'audience_network_rewarded_video',\n 'audience_network_native_banner_and_interstitial',\n 'an',\n 'others',\n /** the macro itself, when Meta did not expand it (written in a field it does not substitute, or a\n * preview click): still only ever produced by a Meta ad URL, so still a paid Meta click */\n '{{placement}}',\n] as const;\nexport const DISPLAY_MEDIUMS = ['display', 'banner', 'expandable', 'interstitial'] as const;\n/** GA4's email spellings, as a source or a medium. */\nexport const EMAIL_MEDIUMS = ['email', 'e-mail', 'e_mail', 'e mail'] as const;\n/** A medium that says email or newsletter anywhere in it: `outbound email`, `cold_email`, `newsletter`, and GA4's four. */\nexport const EMAIL_MEDIUM = /(^|[^a-z])(e[-_ ]?mail|newsletter)([^a-z]|$)/;\n\n/** Where a touch came from: a tracked session, or a report by the user or staff. */\nexport const TOUCH_SOURCES = ['tracked', 'reported'] as const;\nexport type TouchSource = (typeof TOUCH_SOURCES)[number];\n\n/**\n * How a reported touch was learned:\n * - survey: the user answered \"how did you hear about us\" (onboarding, checkout)\n * - promo_code: the user redeemed a code that belongs to a channel\n * - phone: a call came in on a channel's dedicated number, marked by staff or the phone system\n * - manual: staff recorded what a customer told them\n */\nexport const REPORTED_TOUCH_KINDS = ['survey', 'promo_code', 'phone', 'manual'] as const;\nexport type ReportedTouchKind = (typeof REPORTED_TOUCH_KINDS)[number];\n\n/**\n * How much a touch is worth against another when attribution has to choose between sessions;\n * lower wins, and the latest wins among equals. Stored on the session when it is classified, so\n * renumbering means reclassifying.\n *\n * This ranks touches against each other. Within one session the rules that name its channel have\n * their own order — `utm_source`, then a click id, then the ad landing page, then the referrer —\n * and the first that says something wins; the session's priority is then the tier of that rule.\n * So two sessions tagged with utm and gclid respectively are equal here (both `campaign`) and the\n * later one is credited, while one session carrying both is named by its utm.\n */\nexport const TOUCH_PRIORITY = {\n /** utm, click id, ad landing page: someone tagged that link (in that order within a session) */\n campaign: 1,\n /** a reported touch staff stand behind: a call on a channel's number, a recorded conversation */\n verified: 1,\n /** the browser said where the visitor came from; nobody chose it */\n referrer: 2,\n /** a reported touch that is the user's claim: a survey answer, a code that may have been shared */\n claimed: 3,\n} as const satisfies Record<string, number>;\n\n/** Which reported kinds are staff facts and which are the user's claims. */\nexport const REPORTED_TOUCH_PRIORITY = {\n phone: TOUCH_PRIORITY.verified,\n manual: TOUCH_PRIORITY.verified,\n survey: TOUCH_PRIORITY.claimed,\n promo_code: TOUCH_PRIORITY.claimed,\n} as const satisfies Record<ReportedTouchKind, number>;\n"],"mappings":";;;;;;;;AAUA,MAAa,iBAAiB;;AAE9B,MAAa,YAAY;;AAEzB,MAAa,iBAAiB;;AAG9B,MAAa,WAAW;CACtB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAIA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CAKA;AACF;;AAKA,MAAa,iBAAiB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;AACF;;AAKA,MAAa,iBAAiB;CAC5B,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,KAAK;CACL,UAAU;CACV,WAAW;CACX,MAAM;CACN,SAAS;CACT,cAAc;CACd,WAAW;CACX,SAAS;CACT,eAAe;CACf,mBAAmB;CACnB,QAAQ;CACR,iBAAiB;CACjB,aAAa;CACb,eAAe;CACf,gBAAgB;CAChB,cAAc;CACd,YAAY;AACd;;;;;;AAOA,MAAa,oBAAoB;CAC/B,CAAC,UAAU,MAAM;CACjB,CAAC,OAAO,MAAM;CACd,CAAC,SAAS,QAAQ;CAClB,CAAC,UAAU,QAAQ;CACnB,CAAC,UAAU,QAAQ;CACnB,CAAC,cAAc,QAAQ;CACvB,CAAC,kBAAkB,QAAQ;CAC3B,CAAC,SAAS,OAAO;CACjB,CAAC,WAAW,WAAW;CACvB,CAAC,UAAU,QAAQ;CACnB,CAAC,WAAW,QAAQ;CACpB,CAAC,aAAa,UAAU;CACxB,CAAC,SAAS,UAAU;CACpB,CAAC,UAAU,GAAG;CACd,CAAC,eAAe,OAAO;CACvB,CAAC,S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;;AAW3B,MAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;AACF;AACA,MAAa,kBAAkB;CAAC;CAAW;CAAU;CAAc;AAAc;;AAEjF,MAAa,gBAAgB;CAAC;CAAS;CAAU;CAAU;AAAQ;;AAEnE,MAAa,eAAe;;AAG5B,MAAa,gBAAgB,CAAC,WAAW,UAAU;;;;;;;;AAUnD,MAAa,uBAAuB;CAAC;CAAU;CAAc;CAAS;AAAQ;;;;;;;;;;;;AAc9E,MAAa,iBAAiB;;CAE5B,UAAU;;CAEV,UAAU;;CAEV,UAAU;;CAEV,SAAS;AACX;;AAGA,MAAa,0BAA0B;CACrC,OAAO,eAAe;CACtB,QAAQ,eAAe;CACvB,QAAQ,eAAe;CACvB,YAAY,eAAe;AAC7B"}
|
|
1
|
+
{"version":3,"file":"vocabulary.mjs","names":[],"sources":["../../src/attribution/vocabulary.ts"],"sourcesContent":["import type { AdvertisingInfo } from '../track/types';\n\n/**\n * The vocabulary attribution is built from, shared by every product's `session` table and by the\n * dashboards that read it. Data for `classifyTouch` (./classify), which turns it into a channel;\n * a product's dashboards read the same names back. What stays with the product is its own hostnames\n * (referrer exclusions) and its landing-page conventions.\n */\n\n/** A session that arrived through nothing we can name. GA's spelling, so dashboards read as GA. */\nexport const DIRECT_CHANNEL = '(direct)';\n/** The medium of a direct session. */\nexport const NO_MEDIUM = '(none)';\n/** The medium of a tagged link that named a source but no medium. */\nexport const MEDIUM_NOT_SET = '(not set)';\n\n/** The channels the rules below can name. A `utm_source` outside this list is its own channel. */\nexport const CHANNELS = [\n 'meta',\n 'google',\n 'dv360',\n 'microsoft',\n 'tiktok',\n 'reddit',\n 'linkedin',\n 'snapchat',\n 'x',\n 'kakao',\n 'yandex',\n 'yahoo',\n 'duckduckgo',\n 'baidu',\n 'ecosia',\n 'naver',\n 'brave',\n 'pinterest',\n 'youtube',\n /** AI assistants that send people to sites: ChatGPT tags its links `utm_source=chatgpt.com`, the\n * others show as a referrer. Their own channel group, `organic_ai`, since GA4's default groups\n * would file them under Referral / Unassigned and the question \"how much does AI bring\" comes up. */\n 'chatgpt',\n 'perplexity',\n 'gemini',\n 'claude',\n 'copilot',\n 'grok',\n /** and the Chinese ones — DeepSeek, 豆包, Kimi, 通义, 腾讯元宝, 文心一言, 智谱清言 */\n 'deepseek',\n 'doubao',\n 'kimi',\n 'qwen',\n 'yuanbao',\n 'ernie',\n 'zhipu',\n /** the product's own referral programme: the session came through a member's link or code.\n * How a product recognises one (a `/refer/<code>` path, a code at sign-up) is its own rule. Not\n * `referral`: that word is the channel group of any outside site, and a channel of the same name\n * would be impossible to tell apart in queries. */\n 'referral_program',\n] as const;\n\nexport type Channel = (typeof CHANNELS)[number];\n\n/** GA4's default channel groups, as identifiers; a dashboard maps them to display names. */\nexport const CHANNEL_GROUPS = [\n 'direct',\n 'paid_search',\n 'paid_social',\n 'paid_other',\n 'display',\n 'organic_search',\n 'organic_social',\n 'organic_video',\n /** not in GA4's default grouping: sessions an AI assistant sent, by referrer or by ChatGPT's utm */\n 'organic_ai',\n 'referral',\n 'email',\n 'affiliate',\n 'unassigned',\n] as const;\n\nexport type ChannelGroup = (typeof CHANNEL_GROUPS)[number];\n\n/** `utm_source` spellings that mean the same channel: Meta's `{{site_source_name}}` values and the usual synonyms. */\nexport const SOURCE_ALIASES = {\n fb: 'meta',\n ig: 'meta',\n an: 'meta',\n msg: 'meta',\n th: 'meta',\n facebook: 'meta',\n instagram: 'meta',\n bing: 'microsoft',\n twitter: 'x',\n 'google ads': 'google',\n googleads: 'google',\n adwords: 'google',\n 'chatgpt.com': 'chatgpt',\n 'chat.openai.com': 'chatgpt',\n openai: 'chatgpt',\n 'perplexity.ai': 'perplexity',\n 'claude.ai': 'claude',\n 'copilot.com': 'copilot',\n 'deepseek.com': 'deepseek',\n 'doubao.com': 'doubao',\n 'kimi.com': 'kimi',\n} as const satisfies Record<string, Channel>;\n\n/**\n * Which click id belongs to which channel, in priority order, and whether the platform puts it on\n * its ad clicks only (`'ads'`) or on other links as well (`'any'`). Every key is a field this SDK\n * collects (`AdvertisingInfo`).\n *\n * The third column decides whether the id can say a click was paid when a `utm_source` names the\n * channel but no `utm_medium` says how (a Reddit ad tagged `utm_source=reddit` and nothing more).\n * `fbclid` is `'any'`: Meta decorates every outbound link with it, organic posts, profile links\n * and shares included. `twclid` and `ko_click_id` are `'any'` until it is clear they never\n * decorate an organic link.\n *\n * Deliberately absent: `fbp` and `rdt_uuid`, pixel browser ids present with or without a click;\n * and `fbc`, which the SDK only ever reads from the `_fbc` cookie. That cookie lives 90 days after\n * a Meta click, so counting it named every later visit — typed in, from search, from an email — a\n * new Meta click. `fbclid` is read from the landing URL only, so it is this visit's click.\n */\nexport const CLICK_ID_CHANNELS = [\n ['fbclid', 'meta', 'any'],\n ['gclid', 'google', 'ads'],\n ['gbraid', 'google', 'ads'],\n ['wbraid', 'google', 'ads'],\n ['gad_source', 'google', 'ads'],\n ['gad_campaignid', 'google', 'ads'],\n ['dclid', 'dv360', 'ads'],\n ['msclkid', 'microsoft', 'ads'],\n ['ttclid', 'tiktok', 'ads'],\n ['rdt_cid', 'reddit', 'ads'],\n ['li_fat_id', 'linkedin', 'ads'],\n ['ScCid', 'snapchat', 'ads'],\n ['twclid', 'x', 'any'],\n ['ko_click_id', 'kakao', 'any'],\n ['yclid', 'yandex', 'ads'],\n ['oppref', 'chatgpt', 'ads'],\n ['epik', 'pinterest', 'ads'],\n] as const satisfies readonly (readonly [keyof AdvertisingInfo, Channel, 'ads' | 'any'])[];\n\n/**\n * A landing page reserved for one channel's ads, for ads that lost their parameters:\n * `/lp/<channel>`, with or without host, query and hash; the capture is the channel. A product\n * that names its landing pages differently replaces this.\n */\nexport const AD_LANDING_PAGE = /^(?:https?:\\/\\/[^/]+)?\\/lp\\/([a-z]+)(?:[/?#]|$)/;\n\nexport type ReferrerMedium = 'organic' | 'social' | 'video' | 'ai';\n\n/**\n * Referrer hosts that name a channel, as regular expressions over the lower-cased host,\n * with the medium GA4 gives that kind of site. Anything else that refers is `referral`, kept as\n * its host. A country TLD is one or two labels (`google.com`, `google.co.uk`, `google.com.hk`),\n * never an open tail, so `google.com.evil.io` is not Google. In match order: the AI assistants\n * first, because `gemini.google.com`, `copilot.microsoft.com` and `yiyan.baidu.com` would\n * otherwise be Google, Microsoft and Baidu search.\n */\nexport const REFERRER_SITES = [\n ['chatgpt', 'ai', /(^|\\.)(chatgpt\\.com|chat\\.openai\\.com)$/],\n ['perplexity', 'ai', /(^|\\.)perplexity\\.ai$/],\n ['gemini', 'ai', /^gemini\\.google\\.com$/],\n ['claude', 'ai', /(^|\\.)claude\\.ai$/],\n ['copilot', 'ai', /^copilot\\.microsoft\\.com$|(^|\\.)copilot\\.com$/],\n ['grok', 'ai', /(^|\\.)(grok\\.com|x\\.ai)$/],\n ['deepseek', 'ai', /(^|\\.)deepseek\\.com$/],\n ['doubao', 'ai', /(^|\\.)doubao\\.com$/],\n ['kimi', 'ai', /(^|\\.)(kimi\\.com|kimi\\.moonshot\\.cn|moonshot\\.cn)$/],\n ['qwen', 'ai', /^tongyi\\.aliyun\\.com$|(^|\\.)(tongyi\\.com|qianwen\\.com|qwen\\.ai)$/],\n ['yuanbao', 'ai', /^yuanbao\\.tencent\\.com$/],\n ['ernie', 'ai', /^yiyan\\.baidu\\.com$|(^|\\.)ernie\\.baidu\\.com$/],\n ['zhipu', 'ai', /(^|\\.)(chatglm\\.cn|zhipuai\\.cn|bigmodel\\.cn)$/],\n ['google', 'organic', /(^|\\.)google\\.[a-z]{2,}(\\.[a-z]{2,3})?$/],\n ['microsoft', 'organic', /(^|\\.)bing\\.com$/],\n ['yahoo', 'organic', /(^|\\.)yahoo\\.[a-z]{2,}(\\.[a-z]{2,3})?$/],\n ['duckduckgo', 'organic', /(^|\\.)duckduckgo\\.com$/],\n ['baidu', 'organic', /(^|\\.)baidu\\.com$/],\n ['yandex', 'organic', /(^|\\.)yandex\\.[a-z]{2,}(\\.[a-z]{2,3})?$/],\n ['ecosia', 'organic', /(^|\\.)ecosia\\.org$/],\n ['naver', 'organic', /(^|\\.)naver\\.com$/],\n ['brave', 'organic', /^search\\.brave\\.com$/],\n ['meta', 'social', /(^|\\.)(facebook\\.com|instagram\\.com|fb\\.com|threads\\.net)$/],\n ['x', 'social', /(^|\\.)(twitter\\.com|x\\.com|t\\.co)$/],\n ['linkedin', 'social', /(^|\\.)(linkedin\\.com|lnkd\\.in)$/],\n ['reddit', 'social', /(^|\\.)reddit\\.com$/],\n ['tiktok', 'social', /(^|\\.)tiktok\\.com$/],\n ['pinterest', 'social', /(^|\\.)pinterest\\.[a-z]{2,}(\\.[a-z]{2,3})?$/],\n ['snapchat', 'social', /(^|\\.)snapchat\\.com$/],\n ['youtube', 'video', /(^|\\.)(youtube\\.com|youtu\\.be)$/],\n] as const satisfies readonly (readonly [Channel, ReferrerMedium, RegExp])[];\n\n/**\n * Referrer hosts that are navigation, not acquisition, when a session happens to start on the way\n * back from them: the local dev host; the payment providers a visitor is bounced through; the\n * sign-in providers whose login lives on a host of its own (Google, Apple, Microsoft, WeChat,\n * Kakao, LINE, Naver, Yahoo, Twitch, X's OAuth 1.0a endpoint); and the hosted auth services a\n * product may sit behind (Auth0, Okta, Supabase, Firebase, Clerk). A product appends its own\n * hostnames — a session that starts from an internal link after the session timeout refers to\n * them. Matched before `REFERRER_SITES`, so `nid.naver.com` and `login.yahoo.com` are not read as\n * a search. Providers whose login shares the host with their content — Facebook, X's OAuth 2.0,\n * LinkedIn, GitHub, Discord — cannot be told apart by host (referrer policies strip the path) and\n * are left as the referrers they usually are. Regular expressions over the lower-cased host.\n */\nexport const REFERRERS_NOT_A_TOUCH = [\n /^localhost(:|$)/,\n // payment\n /(^|\\.)stripe\\.com$/,\n /^pay\\.google\\.com$/,\n /(^|\\.)paypal\\.com$/,\n /(^|\\.)alipay\\.com$/,\n /(^|\\.)paddle\\.com$/,\n /(^|\\.)lemonsqueezy\\.com$/,\n // app stores\n /^apps\\.apple\\.com$/,\n /^play\\.google\\.com$/,\n // sign-in providers with a login host of their own\n /^accounts\\.google\\.com$/,\n /^appleid\\.apple\\.com$/,\n /^login\\.(microsoftonline|live)\\.com$/,\n /^open\\.weixin\\.qq\\.com$/,\n /^(kauth|accounts)\\.kakao\\.com$/,\n /^access\\.line\\.me$/,\n /^nid\\.naver\\.com$/,\n /^login\\.yahoo\\.com$/,\n /^id\\.twitch\\.tv$/,\n /^api\\.twitter\\.com$/,\n // hosted auth services\n /(^|\\.)auth0\\.com$/,\n /(^|\\.)okta\\.com$/,\n /(^|\\.)supabase\\.co$/,\n /(^|\\.)firebaseapp\\.com$/,\n /(^|\\.)clerk\\.accounts\\.dev$/,\n] as const;\n\n/** GA4's paid mediums — cpc, cpm, ppc, retargeting, paid_social, … — plus Performance Max. */\nexport const PAID_MEDIUM = /^(.*cp.*|ppc|retargeting|paid.*|pmax|performance_max)$/;\n/**\n * Meta's `{{placement}}` values, lower-cased, which an ad URL template of `utm_medium={{placement}}`\n * puts in the medium. Only an ad carries one — an organic post arrives as a referrer, with no utm\n * at all — so a medium in this list is a paid Meta click whatever the source says (a template with\n * `utm_source=meta-websitekeyinfo` was seen). Listed one by one rather than matched by prefix, so\n * that a hand-tagged `instagram_stories` post cannot be mistaken for an ad only because of how it\n * is spelled … which means a placement Meta adds later shows up as unassigned until it is added\n * here. Meta's documented values plus the ones seen in the wild (`facebook_mobile_reels`,\n * `facebook_notification`, `an`), and the literal macro for a template that did not expand it.\n */\nexport const META_PLACEMENTS = [\n 'facebook_desktop_feed',\n 'facebook_mobile_feed',\n 'facebook_mobile_reels',\n 'facebook_reels',\n 'facebook_reels_overlay',\n 'facebook_right_column',\n 'facebook_marketplace',\n 'facebook_video_feeds',\n 'facebook_stories',\n 'facebook_search',\n 'facebook_instream_video',\n 'facebook_instant_article',\n 'facebook_groups_feed',\n 'facebook_profile_feed',\n 'facebook_notification',\n 'facebook_notifications',\n 'facebook_business_explore',\n 'instagram_feed',\n 'instagram_stories',\n 'instagram_reels',\n 'instagram_reels_overlay',\n 'instagram_explore',\n 'instagram_explore_home',\n 'instagram_search',\n 'instagram_shop',\n 'instagram_profile_feed',\n 'instagram_profile_reels',\n 'instagram_igtv',\n 'messenger_inbox',\n 'messenger_stories',\n 'messenger_sponsored_messages',\n 'threads_feed',\n 'whatsapp_status',\n 'audience_network_classic',\n 'audience_network_rewarded_video',\n 'audience_network_native_banner_and_interstitial',\n 'an',\n 'others',\n /** the macro itself, when Meta did not expand it (written in a field it does not substitute, or a\n * preview click): still only ever produced by a Meta ad URL, so still a paid Meta click */\n '{{placement}}',\n] as const;\nexport const DISPLAY_MEDIUMS = ['display', 'banner', 'expandable', 'interstitial'] as const;\n/** GA4's email spellings, as a source or a medium. */\nexport const EMAIL_MEDIUMS = ['email', 'e-mail', 'e_mail', 'e mail'] as const;\n/** A medium that says email or newsletter anywhere in it: `outbound email`, `cold_email`, `newsletter`, and GA4's four. */\nexport const EMAIL_MEDIUM = /(^|[^a-z])(e[-_ ]?mail|newsletter)([^a-z]|$)/;\n\n/** Where a touch came from: a tracked session, or a report by the user or staff. */\nexport const TOUCH_SOURCES = ['tracked', 'reported'] as const;\nexport type TouchSource = (typeof TOUCH_SOURCES)[number];\n\n/**\n * How a reported touch was learned:\n * - survey: the user answered \"how did you hear about us\" (onboarding, checkout)\n * - promo_code: the user redeemed a code that belongs to a channel\n * - phone: a call came in on a channel's dedicated number, marked by staff or the phone system\n * - manual: staff recorded what a customer told them\n */\nexport const REPORTED_TOUCH_KINDS = ['survey', 'promo_code', 'phone', 'manual'] as const;\nexport type ReportedTouchKind = (typeof REPORTED_TOUCH_KINDS)[number];\n\n/**\n * How much a touch is worth against another when attribution has to choose between sessions;\n * lower wins, and the latest wins among equals. Stored on the session when it is classified, so\n * renumbering means reclassifying.\n *\n * This ranks touches against each other. Within one session the rules that name its channel have\n * their own order — `utm_source`, then a click id, then the ad landing page, then the referrer —\n * and the first that says something wins; the session's priority is then the tier of that rule.\n * So two sessions tagged with utm and gclid respectively are equal here (both `campaign`) and the\n * later one is credited, while one session carrying both is named by its utm.\n */\nexport const TOUCH_PRIORITY = {\n /** utm, click id, ad landing page: someone tagged that link (in that order within a session) */\n campaign: 1,\n /** a reported touch staff stand behind: a call on a channel's number, a recorded conversation */\n verified: 1,\n /** the browser said where the visitor came from; nobody chose it */\n referrer: 2,\n /** a reported touch that is the user's claim: a survey answer, a code that may have been shared */\n claimed: 3,\n} as const satisfies Record<string, number>;\n\n/** Which reported kinds are staff facts and which are the user's claims. */\nexport const REPORTED_TOUCH_PRIORITY = {\n phone: TOUCH_PRIORITY.verified,\n manual: TOUCH_PRIORITY.verified,\n survey: TOUCH_PRIORITY.claimed,\n promo_code: TOUCH_PRIORITY.claimed,\n} as const satisfies Record<ReportedTouchKind, number>;\n"],"mappings":";;;;;;;;AAUA,MAAa,iBAAiB;;AAE9B,MAAa,YAAY;;AAEzB,MAAa,iBAAiB;;AAG9B,MAAa,WAAW;CACtB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAIA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CAKA;AACF;;AAKA,MAAa,iBAAiB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;AACF;;AAKA,MAAa,iBAAiB;CAC5B,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,KAAK;CACL,IAAI;CACJ,UAAU;CACV,WAAW;CACX,MAAM;CACN,SAAS;CACT,cAAc;CACd,WAAW;CACX,SAAS;CACT,eAAe;CACf,mBAAmB;CACnB,QAAQ;CACR,iBAAiB;CACjB,aAAa;CACb,eAAe;CACf,gBAAgB;CAChB,c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/bot/index.cjs
CHANGED
|
@@ -156,6 +156,16 @@ const NAMED_BOTS = [
|
|
|
156
156
|
"ai_assistant",
|
|
157
157
|
/manus-user/i
|
|
158
158
|
],
|
|
159
|
+
[
|
|
160
|
+
"Shap-User",
|
|
161
|
+
"ai_assistant",
|
|
162
|
+
/shap-user/i
|
|
163
|
+
],
|
|
164
|
+
[
|
|
165
|
+
"QuillBot",
|
|
166
|
+
"ai_assistant",
|
|
167
|
+
/quillbot/i
|
|
168
|
+
],
|
|
159
169
|
[
|
|
160
170
|
"Amzn-User",
|
|
161
171
|
"ai_assistant",
|
|
@@ -301,6 +311,11 @@ const NAMED_BOTS = [
|
|
|
301
311
|
"ai_search",
|
|
302
312
|
/cloudflare-autorag/i
|
|
303
313
|
],
|
|
314
|
+
[
|
|
315
|
+
"ShapBot",
|
|
316
|
+
"ai_search",
|
|
317
|
+
/shapbot/i
|
|
318
|
+
],
|
|
304
319
|
[
|
|
305
320
|
"GPTBot",
|
|
306
321
|
"ai_crawler",
|
|
@@ -376,6 +391,16 @@ const NAMED_BOTS = [
|
|
|
376
391
|
"ai_crawler",
|
|
377
392
|
/pangubot/i
|
|
378
393
|
],
|
|
394
|
+
[
|
|
395
|
+
"PromptingBot",
|
|
396
|
+
"ai_crawler",
|
|
397
|
+
/promptingbot/i
|
|
398
|
+
],
|
|
399
|
+
[
|
|
400
|
+
"Reflectionbot",
|
|
401
|
+
"ai_crawler",
|
|
402
|
+
/reflectionbot/i
|
|
403
|
+
],
|
|
379
404
|
[
|
|
380
405
|
"TikTokSpider",
|
|
381
406
|
"ai_crawler",
|
|
@@ -1103,6 +1128,17 @@ function nameOfUnknownBot(userAgent, matched) {
|
|
|
1103
1128
|
return matched.replace(/^\W+|\W+$/g, "").slice(0, 64) || "unknown";
|
|
1104
1129
|
}
|
|
1105
1130
|
/**
|
|
1131
|
+
* The request user agent of a page opened in Facebook's or Instagram's in-app browser when the
|
|
1132
|
+
* app sends the page's requests through its own network stack: `[FBAN/FB4A;FBAV/…]`,
|
|
1133
|
+
* `Instagram 445.0.0.34.44 (iPhone18,1; iOS 26_6_1; …) AppleWebKit/420+`. The page itself still
|
|
1134
|
+
* reads a browser's `navigator.userAgent`, which is why PostHog, GA4 and Matomo see a person.
|
|
1135
|
+
* isbot's generic pattern takes both for bots (a long token with no space, a product token that is
|
|
1136
|
+
* no browser's), so they are people here before it runs. Meta's ad prefetch loads only the HTML,
|
|
1137
|
+
* which runs no script and creates no visitor. The in-app browser's own user agent starts with
|
|
1138
|
+
* `Mozilla/5.0`, so the anchors leave it alone.
|
|
1139
|
+
*/
|
|
1140
|
+
const META_APP = /^\[FBAN\/|^Instagram \d+(?:\.\d+)+ \(/;
|
|
1141
|
+
/**
|
|
1106
1142
|
* Whether a web visitor is a bot, which one, and what kind. Run on the server when the visitor
|
|
1107
1143
|
* is created, with the tags it was created with: the user agent is the request's header
|
|
1108
1144
|
* (`tags.user_agent`, which the server writes), not anything the client says about itself, so
|
|
@@ -1113,7 +1149,8 @@ function nameOfUnknownBot(userAgent, matched) {
|
|
|
1113
1149
|
*
|
|
1114
1150
|
* In order: a bot we can name; a browser driven by WebDriver (`tags.webdriver`, which the SDK
|
|
1115
1151
|
* sets from `navigator.webdriver`, the one sign a scripted browser with a normal user agent
|
|
1116
|
-
* gives); anything the generic pattern calls automated; no
|
|
1152
|
+
* gives); a person in a Meta app (`META_APP`); anything the generic pattern calls automated; no
|
|
1153
|
+
* user agent at all.
|
|
1117
1154
|
*/
|
|
1118
1155
|
function botOf(tags) {
|
|
1119
1156
|
const userAgent = typeof tags.user_agent === "string" ? tags.user_agent.trim() : "";
|
|
@@ -1129,6 +1166,7 @@ function botOf(tags) {
|
|
|
1129
1166
|
bot_name: unknownName ?? "WebDriver",
|
|
1130
1167
|
bot_category: "headless_browser"
|
|
1131
1168
|
};
|
|
1169
|
+
if (META_APP.test(userAgent)) return NOT_A_BOT;
|
|
1132
1170
|
if (unknownName) return {
|
|
1133
1171
|
is_bot: true,
|
|
1134
1172
|
bot_name: unknownName,
|
package/dist/bot/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["GENERIC_BOT"],"sources":["../../src/bot/index.ts"],"sourcesContent":["import type { TrackTags } from '../track/types';\nimport { GENERIC_BOT } from './generic';\n\n/**\n * What kind of automated visitor a bot is, as the analytics tools that report bots separately\n * group them (PostHog's traffic categories, Cloudflare's verified bot categories, Matomo's\n * DeviceDetector). Stored next to the name so dashboards can group without re-deriving:\n *\n * - search_crawler: indexes pages for a search engine (Googlebot, Bingbot, Baiduspider)\n * - ai_crawler: collects content to train models (GPTBot, ClaudeBot, Meta-ExternalAgent)\n * - ai_search: indexes pages for an AI search product (OAI-SearchBot, PerplexityBot)\n * - ai_assistant: fetches a page because a person asked an assistant to (ChatGPT-User)\n * - advertising: works for an ad system — reviews landing pages, targets or verifies ads\n * (Meta-ExternalAds, AdsBot-Google, Mediapartners-Google)\n * - link_preview: renders the card of a link shared in a feed or a chat (facebookexternalhit)\n * - seo_tool: SEO, marketing and page-speed tools (AhrefsBot, Lighthouse, HubSpot)\n * - monitoring: uptime checks, synthetics and service callers (Pingdom, Stripe)\n * - headless_browser: a scripted browser (HeadlessChrome, Playwright, a WebDriver session)\n * - http_client: a library or command-line client (curl, python-requests)\n * - no_user_agent: a request without a user agent, which no browser sends\n * - other: automated by every sign, but none of the above\n */\nexport const BOT_CATEGORIES = [\n 'search_crawler',\n 'ai_crawler',\n 'ai_search',\n 'ai_assistant',\n 'advertising',\n 'link_preview',\n 'seo_tool',\n 'monitoring',\n 'headless_browser',\n 'http_client',\n 'no_user_agent',\n 'other',\n] as const;\n\nexport type BotCategory = (typeof BOT_CATEGORIES)[number];\n\n/**\n * The verdict, shaped like the columns a product stores it in (`is_bot`, `bot_name`,\n * `bot_category`). A person is `{ is_bot: false, bot_name: null, bot_category: null }`.\n */\nexport type Bot =\n | { is_bot: true; bot_name: string; bot_category: BotCategory }\n | { is_bot: false; bot_name: null; bot_category: null };\n\nexport const NOT_A_BOT: Bot = { is_bot: false, bot_name: null, bot_category: null };\n\n/**\n * Bots we can name, as `[name, category, pattern]`, tried in order; the first match wins.\n *\n * Where the list comes from (checked 2026-09-30):\n * - bowser's bot parsers (the ~25 named bots its `platform.type === 'bot'` reports), which this\n * replaces.\n * - PostHog's `bot_definitions.py` (web analytics traffic classification), for the bots and\n * categories an analytics product sees most.\n * - ai.robots.txt (`robots.json`), for AI crawlers, search bots, assistants and agents.\n * - The operators' own docs for the big ones: Google's crawler list, OpenAI's and Anthropic's\n * bot pages, Meta's web crawlers, Perplexity, Bing, Apple.\n * - Bots seen in production (Meta-ExternalAds, HubSpot, Bytespider).\n * Every entry was run against the real user agents in crawler-user-agents and PostHog's\n * fixtures, and bowser's browser fixtures were run to check no browser is taken for a bot\n * (Sogou's browser against its spider, Pinterest's in-app browser against its bot); see\n * `index.test.ts` for where to get them.\n *\n * The link above each entry is the operator's page about the bot, else its product page, else\n * its Known Agents profile (knownagents.com, formerly Dark Visitors) when the operator has none.\n *\n * Names are the operators' spelling of their user agent token. Order matters where one token\n * contains another or borrows a name: advertising and SEO tools come before the search engines\n * whose names they carry, and the more specific of Meta's, Anthropic's and Perplexity's tokens\n * come first. The long tail is left to the generic pattern, filed as `other` and named by\n * `nameOfUnknownBot`; add a bot here when it is worth its own category or name in a dashboard.\n */\nexport const NAMED_BOTS = [\n // advertising: before the search crawlers, AdsBot and Mediapartners carry Google's name\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['Meta-ExternalAds', 'advertising', /meta-externalads/i],\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['facebookcatalog', 'advertising', /facebookcatalog/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-special-case-crawlers\n ['AdsBot-Google', 'advertising', /adsbot-google/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-special-case-crawlers\n ['Mediapartners-Google', 'advertising', /mediapartners-google/i],\n // https://www.bing.com/webmasters/help/which-crawlers-does-bing-use-8c184ec0\n ['AdIdxBot', 'advertising', /adidxbot/i],\n // https://support.google.com/adwords/answer/2404197\n ['Google-AdWords', 'advertising', /google-adwords/i],\n // https://support.google.com/google-ads/answer/6095821\n ['Google-Ads-Conversions', 'advertising', /google-ads-conversions/i],\n // https://developers.openai.com/api/docs/bots\n ['OAI-AdsBot', 'advertising', /oai-adsbot/i],\n // https://businesshelp.snapchat.com/s/article/adsbot-crawler\n ['SnapchatAds', 'advertising', /snapchatads/i],\n // https://www.taboola.com\n ['Taboolabot', 'advertising', /taboolabot/i],\n\n // AI assistants and agents: a person asked for this page\n // https://developers.openai.com/api/docs/bots\n ['ChatGPT-User', 'ai_assistant', /chatgpt-user/i],\n // https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler\n ['Claude-User', 'ai_assistant', /claude-user/i],\n // https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler\n ['Claude-Web', 'ai_assistant', /claude-web/i],\n // https://docs.perplexity.ai/guides/bots\n ['Perplexity-User', 'ai_assistant', /perplexity-user/i],\n // https://duckduckgo.com/duckduckgo-help-pages/results/duckassistbot\n ['DuckAssistBot', 'ai_assistant', /duckassistbot/i],\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['Meta-ExternalFetcher', 'ai_assistant', /meta-externalfetcher/i],\n // https://docs.mistral.ai/robots\n ['MistralAI-User', 'ai_assistant', /mistralai-user/i],\n // https://knownagents.com/agents/manus-user\n ['Manus-User', 'ai_assistant', /manus-user/i],\n // https://developer.amazon.com/amazonbot\n ['Amzn-User', 'ai_assistant', /amzn-user/i],\n // https://knownagents.com/agents/amazon-qbusiness\n ['amazon-QBusiness', 'ai_assistant', /amazon-qbusiness/i],\n // https://docs.aws.amazon.com/bedrock-agentcore/\n ['Amazon-Bedrock-AgentCore-Browser', 'ai_assistant', /amazon-bedrock-agentcore/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-user-triggered-fetchers\n ['Google-Agent', 'ai_assistant', /google-?agent/i],\n // https://gemini.google/overview/deep-research/\n ['Gemini-Deep-Research', 'ai_assistant', /gemini-deep-research/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-user-triggered-fetchers\n ['Google-NotebookLM', 'ai_assistant', /google-notebooklm/i],\n // https://www.kimi.ai/policies/kimi-crawlers\n ['Kimi-User', 'ai_assistant', /kimi-(?:user|agent)/i],\n // https://knownagents.com/agents/tongyibot\n ['TongyiBot', 'ai_assistant', /tongyibot/i],\n // https://knownagents.com/agents/yiyanbot\n ['YiyanBot', 'ai_assistant', /yiyanbot/i],\n // https://help.kagi.com/kagi/ai/kagi-ai.html\n ['kagi-fetcher', 'ai_assistant', /kagi-fetcher/i],\n // https://devin.ai\n ['Devin', 'ai_assistant', /\\bdevin\\/\\d/i],\n // https://knownagents.com/agents/novaact\n ['NovaAct', 'ai_assistant', /novaact/i],\n\n // AI search\n // https://developers.openai.com/api/docs/bots\n ['OAI-SearchBot', 'ai_search', /oai-searchbot/i],\n // https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler\n ['Claude-SearchBot', 'ai_search', /claude-searchbot/i],\n // https://docs.perplexity.ai/guides/bots\n ['PerplexityBot', 'ai_search', /perplexitybot/i],\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['Meta-WebIndexer', 'ai_search', /meta-webindexer/i],\n // https://developer.amazon.com/amazonbot\n ['Amazonbot', 'ai_search', /amazonbot/i],\n // https://knownagents.com/agents/youbot\n ['YouBot', 'ai_search', /youbot/i],\n // https://knownagents.com/agents/phindbot\n ['PhindBot', 'ai_search', /phindbot/i],\n // https://developer.amazon.com/amazonbot\n ['Amzn-SearchBot', 'ai_search', /amzn-searchbot/i],\n // https://knownagents.com/agents/azureai-searchbot\n ['AzureAI-SearchBot', 'ai_search', /azureai-searchbot/i],\n // https://www.kimi.ai/policies/kimi-crawlers\n ['Kimi-SearchBot', 'ai_search', /kimi-searchbot/i],\n // https://docs.mistral.ai/robots\n ['MistralAI-Index', 'ai_search', /mistralai-index/i],\n // https://knownagents.com/agents/exasearchbot\n ['ExaSearchBot', 'ai_search', /exasearchbot|\\bexabot/i],\n // https://knownagents.com/agents/tavilybot\n ['TavilyBot', 'ai_search', /tavilybot/i],\n // https://linkup.so/bot\n ['LinkupBot', 'ai_search', /linkupbot/i],\n // https://knownagents.com/agents/iaskspider\n ['iAskBot', 'ai_search', /iask(?:bot|spider)/i],\n ['Andibot', 'ai_search', /andibot/i],\n // https://developers.cloudflare.com/autorag\n ['Cloudflare-AutoRAG', 'ai_search', /cloudflare-autorag/i],\n\n // AI training\n // https://developers.openai.com/api/docs/bots\n ['GPTBot', 'ai_crawler', /gptbot/i],\n // https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler\n ['ClaudeBot', 'ai_crawler', /claudebot/i],\n // https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler\n ['anthropic-ai', 'ai_crawler', /anthropic-ai/i],\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['Meta-ExternalAgent', 'ai_crawler', /meta-externalagent/i],\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['FacebookBot', 'ai_crawler', /facebookbot/i],\n // https://knownagents.com/agents/bytespider\n ['Bytespider', 'ai_crawler', /bytespider/i],\n // https://commoncrawl.org/ccbot\n ['CCBot', 'ai_crawler', /ccbot/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers\n ['Google-CloudVertexBot', 'ai_crawler', /google-cloudvertexbot/i],\n // https://knownagents.com/agents/cohere-training-data-crawler\n ['cohere-ai', 'ai_crawler', /cohere-(?:ai|training-data-crawler)/i],\n // https://www.diffbot.com/docs/crawl/faq/robots-txt\n ['Diffbot', 'ai_crawler', /diffbot/i],\n // https://knownagents.com/agents/webzio-extended\n ['Omgili', 'ai_crawler', /omgili|webzio-extended/i],\n // https://imagesift.com/about\n ['ImagesiftBot', 'ai_crawler', /imagesiftbot/i],\n // https://www.timpi.io\n ['Timpibot', 'ai_crawler', /timpibot/i],\n // https://knownagents.com/agents/ai2bot\n ['AI2Bot', 'ai_crawler', /ai2bot/i],\n // https://knownagents.com/agents/pangubot\n ['PanguBot', 'ai_crawler', /pangubot/i],\n // https://knownagents.com/agents/tiktokspider\n ['TikTokSpider', 'ai_crawler', /tiktokspider/i],\n // https://knownagents.com/agents/deepseekbot\n ['DeepSeekBot', 'ai_crawler', /deepseekbot/i],\n // https://knownagents.com/agents/doubaobot\n ['DoubaoBot', 'ai_crawler', /doubaobot/i],\n // https://knownagents.com/agents/erniebot\n ['ERNIEBot', 'ai_crawler', /erniebot/i],\n // https://knownagents.com/agents/qwenbot\n ['QwenBot', 'ai_crawler', /qwenbot/i],\n // https://www.kimi.ai/policies/kimi-crawlers\n ['KimiBot', 'ai_crawler', /kimibot/i],\n // https://knownagents.com/agents/chatglm-spider\n ['ChatGLM-Spider', 'ai_crawler', /chatglm-spider/i],\n // https://docs.mistral.ai/robots\n ['MistralAI-Training', 'ai_crawler', /mistralai-training/i],\n // https://knownagents.com/agents/yandexadditional\n ['YandexAdditional', 'ai_crawler', /yandexadditional/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers\n ['Google-Extended', 'ai_crawler', /google-extended/i],\n // https://docs.aws.amazon.com/kendra/latest/dg/what-is-kendra.html\n ['Amazon Kendra', 'ai_crawler', /amazon-kendra|kendrabot/i],\n // https://knownagents.com/agents/bedrockbot\n ['bedrockbot', 'ai_crawler', /bedrockbot/i],\n // https://brightdata.com/brightbot\n ['Brightbot', 'ai_crawler', /brightbot/i],\n // https://firecrawl.dev\n ['FirecrawlAgent', 'ai_crawler', /firecrawl/i],\n // https://github.com/unclecode/crawl4ai\n ['Crawl4AI', 'ai_crawler', /crawl4ai/i],\n // https://apify.com/apify/website-content-crawler\n ['ApifyBot', 'ai_crawler', /apify/i],\n // https://github.com/rom1504/img2dataset\n ['img2dataset', 'ai_crawler', /img2dataset/i],\n // https://knownagents.com/agents/laion-huggingface-processor\n ['LAION', 'ai_crawler', /laion/i],\n // https://developers.cloudflare.com/browser-rendering/\n ['Cloudflare Browser Rendering', 'ai_crawler', /cloudflarebrowserrendering/i],\n\n // link previews\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['facebookexternalhit', 'link_preview', /facebookexternalhit/i],\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['Facebot', 'link_preview', /facebot/i],\n // https://developer.x.com/en/docs/x-for-websites/cards/guides/getting-started\n ['Twitterbot', 'link_preview', /twitterbot/i],\n // https://www.linkedin.com/help/linkedin/answer/a521928\n ['LinkedInBot', 'link_preview', /linkedinbot/i],\n // https://api.slack.com/robots\n ['Slackbot', 'link_preview', /slackbot|slack-imgproxy/i],\n // https://discord.com\n ['Discordbot', 'link_preview', /discordbot/i],\n // https://core.telegram.org/bots\n ['TelegramBot', 'link_preview', /telegrambot/i],\n // https://www.whatsapp.com\n ['WhatsApp', 'link_preview', /^whatsapp\\//i],\n // https://www.pinterest.com/bot.html\n ['Pinterestbot', 'link_preview', /pinterestbot|^pinterest\\/0\\./i],\n // https://www.reddit.com\n ['redditbot', 'link_preview', /redditbot/i],\n // https://developers.snap.com/robots\n ['Snap URL Preview', 'link_preview', /snap url preview/i],\n // https://knownagents.com/agents/skypeuripreview\n ['SkypeUriPreview', 'link_preview', /skypeuripreview/i],\n // https://www.bing.com/webmasters/help/which-crawlers-does-bing-use-8c184ec0\n ['BingPreview', 'link_preview', /bingpreview|microsoftpreview/i],\n // https://iframely.com/docs/about\n ['Iframely', 'link_preview', /iframely/i],\n // https://embed.ly\n ['Embedly', 'link_preview', /embedly/i],\n // https://devtalk.kakao.com/t/scrap/33984\n ['KakaoTalk-scrap', 'link_preview', /kakaotalk-scrap/i],\n // https://vk.com/dev/Share\n ['vkShare', 'link_preview', /vkshare/i],\n // https://www.viber.com\n ['Viber', 'link_preview', /^viber\\b|viber-crawler/i],\n // https://github.com/bluesky-social/indigo\n ['Bluesky Cardyb', 'link_preview', /cardyb/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-user-triggered-fetchers\n ['Google-PageRenderer', 'link_preview', /google-pagerenderer/i],\n // https://vercel.com\n ['vercel-screenshot', 'link_preview', /vercel-screenshot/i],\n\n // SEO, marketing and page-speed tools; before the search crawlers, Lighthouse and the\n // Search Console tester borrow Google's name\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers\n ['Google-InspectionTool', 'seo_tool', /google-inspectiontool/i],\n // https://developer.chrome.com/docs/lighthouse\n ['Lighthouse', 'seo_tool', /chrome-lighthouse|google page speed insights/i],\n // https://gtmetrix.com\n ['GTmetrix', 'seo_tool', /gtmetrix/i],\n // https://ahrefs.com/robot\n ['AhrefsBot', 'seo_tool', /ahrefs(?:bot|siteaudit)/i],\n // https://www.semrush.com/bot/\n ['SemrushBot', 'seo_tool', /semrush/i],\n // https://mj12bot.com\n ['MJ12bot', 'seo_tool', /mj12bot/i],\n // https://moz.com/help/moz-procedures/crawlers/dotbot\n ['DotBot', 'seo_tool', /dotbot/i],\n // https://moz.com/help/moz-procedures/crawlers/rogerbot\n ['rogerbot', 'seo_tool', /rogerbot/i],\n // https://www.screamingfrog.co.uk/seo-spider/\n ['Screaming Frog', 'seo_tool', /screaming frog/i],\n // https://serpstatbot.com\n ['SerpstatBot', 'seo_tool', /serpstatbot/i],\n // https://webmeup-crawler.com\n ['BLEXBot', 'seo_tool', /blexbot/i],\n // https://dataforseo.com/dataforseo-bot\n ['DataForSeoBot', 'seo_tool', /dataforseobot/i],\n // https://knownagents.com/agents/hubspot-crawler\n ['HubSpot', 'seo_tool', /hubspot/i],\n // https://search.google.com/structured-data/testing-tool\n ['Google-Structured-Data-Testing-Tool', 'seo_tool', /google-structured-data-testing-tool/i],\n // https://www.webpagetest.org\n ['WebPageTest', 'seo_tool', /\\bptst\\/\\d/i],\n // https://www.dareboost.com\n ['DareBoost', 'seo_tool', /dareboost/i],\n // https://www.exensa.com/crawl\n ['Barkrowler', 'seo_tool', /barkrowler/i],\n // https://seranking.com/backlinks-crawler\n ['SE Ranking', 'seo_tool', /seranking|sebot-wa/i],\n // https://www.brightedge.com\n ['BrightEdge', 'seo_tool', /brightedge/i],\n // https://searchatlas.com\n ['SearchAtlas', 'seo_tool', /searchatlas/i],\n // https://www.siteimprove.com\n ['Siteimprove', 'seo_tool', /siteimprove/i],\n // https://www.dataprovider.com\n ['Dataprovider', 'seo_tool', /dataprovider\\.com/i],\n // https://www.meltwater.com\n ['Meltwater', 'seo_tool', /meltwater/i],\n // https://awario.com/bots.html\n ['Awario', 'seo_tool', /awario/i],\n\n // search engines\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers\n ['Googlebot', 'search_crawler', /googlebot/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers\n ['Storebot-Google', 'search_crawler', /storebot-google/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers\n ['GoogleOther', 'search_crawler', /googleother/i],\n // https://www.bing.com/webmasters/help/which-crawlers-does-bing-use-8c184ec0\n ['Bingbot', 'search_crawler', /bingbot/i],\n // https://support.apple.com/en-us/119829\n ['Applebot', 'search_crawler', /applebot/i],\n // https://www.baidu.com/search/spider.html\n ['Baiduspider', 'search_crawler', /baiduspider/i],\n // https://yandex.com/support/webmaster/robot-workings/check-yandex-robots.html\n ['YandexBot', 'search_crawler', /yandex(?:\\w*bot|images|metrika)/i],\n // https://duckduckgo.com/duckduckgo-help-pages/results/duckduckbot\n ['DuckDuckBot', 'search_crawler', /duckduckbot/i],\n // https://help.yahoo.com/kb/SLN22600.html\n ['Yahoo Slurp', 'search_crawler', /yahoo!?[\\s/]*slurp/i],\n // https://www.sogou.com/docs/help/webmasters.htm#07\n ['Sogou', 'search_crawler', /sogou[\\w\\s-]*spider/i],\n // https://www.so.com/help/help_3_2.html\n ['360Spider', 'search_crawler', /360spider|haosouspider/i],\n // https://knownagents.com/agents/yisouspider\n ['YisouSpider', 'search_crawler', /yisouspider/i],\n // https://webmaster.petalsearch.com/site/petalbot\n ['PetalBot', 'search_crawler', /petalbot/i],\n // https://napoveda.seznam.cz/en/seznambot-intro/\n ['SeznamBot', 'search_crawler', /seznambot/i],\n // https://knownagents.com/agents/yeti\n ['Yeti', 'search_crawler', /\\byeti\\//i],\n // https://help2.line.me/linesearchbot/web/?contentId=50006055&lang=en\n ['Linespider', 'search_crawler', /linespider/i],\n // https://help.qwant.com/bot/\n ['Qwantbot', 'search_crawler', /qwant(?:bot|ify)/i],\n // https://help.coccoc.com/searchengine\n ['coccocbot', 'search_crawler', /coccocbot/i],\n // https://www.mojeek.com/bot.html\n ['MojeekBot', 'search_crawler', /mojeekbot/i],\n // https://search.brave.com/help/brave-search-crawler\n ['Bravebot', 'search_crawler', /bravebot/i],\n // https://bot.seekport.com\n ['SeekportBot', 'search_crawler', /seekport/i],\n // https://mwmbl.org\n ['mwmbl', 'search_crawler', /mwmbl/i],\n // https://archive.org/details/archive.org_bot\n ['Internet Archive', 'search_crawler', /archive\\.org_bot|ia_archiver|archive-it|archiveteam/i],\n\n // monitoring, synthetics, security and consent scanners, service callers\n // https://www.pingdom.com\n ['Pingdom', 'monitoring', /pingdom/i],\n // https://uptimerobot.com\n ['UptimeRobot', 'monitoring', /uptimerobot/i],\n // https://www.statuscake.com\n ['StatusCake', 'monitoring', /statuscake/i],\n // https://www.site24x7.com\n ['Site24x7', 'monitoring', /site24x7/i],\n // https://betterstack.com/docs/uptime/\n ['Better Stack', 'monitoring', /better ?uptime|betterstack/i],\n // https://docs.datadoghq.com/synthetics/\n ['Datadog', 'monitoring', /datadog/i],\n // https://www.checklyhq.com/docs/\n ['Checkly', 'monitoring', /checkly/i],\n // https://docs.newrelic.com/docs/synthetics/\n ['NewRelicPinger', 'monitoring', /newrelicpinger/i],\n // https://github.com/louislam/uptime-kuma\n ['Uptime-Kuma', 'monitoring', /uptime-kuma/i],\n // https://grafana.com/docs/grafana-cloud/testing/synthetic-monitoring/\n ['Grafana Synthetic Monitoring', 'monitoring', /grafanasyntheticmonitoring/i],\n // https://docs.dynatrace.com/docs/observe/digital-experience/synthetic-monitoring\n ['Dynatrace', 'monitoring', /ruxitsynthetic|dynatrace/i],\n // https://docs.splunk.com/observability/en/synthetics/intro-synthetics.html\n ['Splunk', 'monitoring', /splunk/i],\n // https://www.catchpoint.com\n ['Catchpoint', 'monitoring', /catchpoint/i],\n // https://ghostinspector.com\n ['Ghost Inspector', 'monitoring', /ghost inspector/i],\n // https://docs.digitalocean.com/products/uptime/\n ['DigitalOcean Uptime', 'monitoring', /digitalocean uptime/i],\n // https://ohdear.app/docs/faq/what-is-the-oh-dear-checker\n ['OhDear', 'monitoring', /ohdear/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-special-case-crawlers\n ['Google-Safety', 'monitoring', /google-safety/i],\n // https://www.cookiebot.com\n ['Cookiebot', 'monitoring', /cookiebot/i],\n // https://knownagents.com/agents/onetrust-cmp-scanner\n ['OneTrust', 'monitoring', /onetrust/i],\n // https://www.cookiehub.com\n ['CookieHub', 'monitoring', /cookiehub/i],\n // https://detectify.com/bot/\n ['Detectify', 'monitoring', /detectify/i],\n // https://about.censys.io\n ['CensysInspect', 'monitoring', /censysinspect/i],\n // https://www.bitsight.com\n ['BitSightBot', 'monitoring', /bitsightbot/i],\n // https://github.com/zmap/zgrab2\n ['zgrab', 'monitoring', /zgrab/i],\n // https://nmap.org/book/nse.html\n ['Nmap', 'monitoring', /nmap scripting engine/i],\n // https://docs.stripe.com/webhooks\n ['Stripe', 'monitoring', /stripe\\/1\\.0|stripebot|merchantsecurityscanner/i],\n\n // scripted browsers\n // https://developer.chrome.com/docs/chromium/headless\n ['HeadlessChrome', 'headless_browser', /headlesschrome/i],\n // https://phantomjs.org\n ['PhantomJS', 'headless_browser', /phantomjs/i],\n // https://slimerjs.org\n ['SlimerJS', 'headless_browser', /slimerjs/i],\n // https://playwright.dev\n ['Playwright', 'headless_browser', /playwright/i],\n // https://pptr.dev\n ['Puppeteer', 'headless_browser', /puppeteer/i],\n // https://www.selenium.dev\n ['Selenium', 'headless_browser', /selenium/i],\n // https://www.cypress.io\n ['Cypress', 'headless_browser', /cypress/i],\n // https://lightpanda.io\n ['Lightpanda', 'headless_browser', /lightpanda/i],\n // https://wkhtmltopdf.org\n ['wkhtmltopdf', 'headless_browser', /wkhtmltopdf/i],\n\n // libraries and command-line clients\n // https://curl.se\n ['curl', 'http_client', /^curl\\//i],\n // https://www.gnu.org/software/wget/\n ['Wget', 'http_client', /^wget\\//i],\n // https://requests.readthedocs.io\n ['python-requests', 'http_client', /python-requests/i],\n // https://docs.python.org/3/library/urllib.request.html\n ['python-urllib', 'http_client', /python-urllib/i],\n // https://docs.aiohttp.org\n ['aiohttp', 'http_client', /aiohttp/i],\n // https://www.python-httpx.org\n ['httpx', 'http_client', /python-httpx|^httpx\\//i],\n // https://scrapy.org\n ['Scrapy', 'http_client', /scrapy/i],\n // https://pkg.go.dev/net/http\n ['Go-http-client', 'http_client', /go-http-client/i],\n // https://github.com/square/okhttp\n ['okhttp', 'http_client', /^okhttp\\//i],\n // https://hc.apache.org/httpcomponents-client-5.5.x/\n ['Java', 'http_client', /^java\\/|apache-httpclient/i],\n // https://axios-http.com\n ['axios', 'http_client', /^axios\\//i],\n // https://github.com/node-fetch/node-fetch\n ['node-fetch', 'http_client', /node-fetch/i],\n // https://undici.nodejs.org\n ['undici', 'http_client', /^undici/i],\n // https://www.postman.com\n ['PostmanRuntime', 'http_client', /postmanruntime/i],\n // https://insomnia.rest\n ['insomnia', 'http_client', /^insomnia\\//i],\n // https://metacpan.org/pod/LWP\n ['libwww-perl', 'http_client', /libwww-perl/i],\n // https://docs.guzzlephp.org\n ['Guzzle', 'http_client', /guzzlehttp/i],\n // https://developers.google.com/apps-script/reference/url-fetch\n ['Google-Apps-Script', 'http_client', /google-apps-script/i],\n // https://support.google.com/docs/answer/3093339\n ['GoogleDocs', 'http_client', /googledocs/i],\n] as const satisfies readonly (readonly [string, BotCategory, RegExp])[];\n\nconst botishToken =\n /\\b([\\w.-]*?(?:bot|crawler|spider|scraper|fetcher|agent|preview|checker|monitor)[\\w-]*)\\b/i;\nconst botishWord = /^(?:bot|crawler|spider|scraper|fetcher|agent|preview|checker|monitor)$/i;\nconst compatibleToken = /compatible;\\s*([a-z][\\w.-]*(?: [a-z][\\w.-]*)?)/i;\nconst productTokens = /([a-z][\\w.-]*)\\/\\d/gi;\nconst browserToken =\n /^(?:mozilla|applewebkit|khtml|gecko|chrome|chromium|safari|version|mobile|firefox|edg|edge|opr|msie|trident)$/i;\n\n/**\n * A name for a bot that is not in the named table, from the first of: a token that sounds like\n * one (`Bytespider`, `ABEvalBot`), the name after `compatible;` (`Google-Read-Aloud`), a product\n * token that is not a browser's (`Barkrowler/0.5`), what the generic pattern matched. URLs and\n * email addresses are dropped first, as nearly every crawler links its docs.\n */\nexport function nameOfUnknownBot(userAgent: string, matched: string): string {\n const text = userAgent\n .replace(/\\+?https?:\\/\\/\\S+/gi, ' ')\n .replace(/[\\w.+-]+@[\\w-]+(?:\\.[\\w-]+)+/g, ' ');\n\n const botish = botishToken.exec(text)?.[1];\n if (botish && !botishWord.test(botish)) return botish.slice(0, 64);\n\n const compatible = compatibleToken.exec(text)?.[1];\n if (compatible && !browserToken.test(compatible)) return compatible.slice(0, 64);\n\n for (const [, product] of text.matchAll(productTokens)) {\n if (!browserToken.test(product)) return product.slice(0, 64);\n }\n\n return matched.replace(/^\\W+|\\W+$/g, '').slice(0, 64) || 'unknown';\n}\n\n/**\n * Whether a web visitor is a bot, which one, and what kind. Run on the server when the visitor\n * is created, with the tags it was created with: the user agent is the request's header\n * (`tags.user_agent`, which the server writes), not anything the client says about itself, so\n * the verdict can be recomputed from stored tags when the rules change.\n *\n * Call it for web visitors only: a native app's requests carry an HTTP library's user agent\n * (CFNetwork, okhttp) that would read as a bot, and no crawler runs the app.\n *\n * In order: a bot we can name; a browser driven by WebDriver (`tags.webdriver`, which the SDK\n * sets from `navigator.webdriver`, the one sign a scripted browser with a normal user agent\n * gives); anything the generic pattern calls automated; no user agent at all.\n */\nexport function botOf(tags: TrackTags): Bot {\n const userAgent = typeof tags.user_agent === 'string' ? tags.user_agent.trim() : '';\n\n for (const [name, category, pattern] of NAMED_BOTS) {\n if (pattern.test(userAgent)) return { is_bot: true, bot_name: name, bot_category: category };\n }\n\n const generic = userAgent ? GENERIC_BOT.exec(userAgent) : null;\n const unknownName = generic ? nameOfUnknownBot(userAgent, generic[0]) : null;\n\n // A scripted browser that says so in its user agent takes that name, else it is just WebDriver.\n if (tags.webdriver === true) {\n return { is_bot: true, bot_name: unknownName ?? 'WebDriver', bot_category: 'headless_browser' };\n }\n\n if (unknownName) return { is_bot: true, bot_name: unknownName, bot_category: 'other' };\n\n if (!userAgent)\n return { is_bot: true, bot_name: '(no user agent)', bot_category: 'no_user_agent' };\n\n return NOT_A_BOT;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAa,iBAAiB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAYA,MAAa,YAAiB;CAAE,QAAQ;CAAO,UAAU;CAAM,cAAc;AAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BlF,MAAa,aAAa;CAGxB;EAAC;EAAoB;EAAe;CAAmB;CAEvD;EAAC;EAAmB;EAAe;CAAkB;CAErD;EAAC;EAAiB;EAAe;CAAgB;CAEjD;EAAC;EAAwB;EAAe;CAAuB;CAE/D;EAAC;EAAY;EAAe;CAAW;CAEvC;EAAC;EAAkB;EAAe;CAAiB;CAEnD;EAAC;EAA0B;EAAe;CAAyB;CAEnE;EAAC;EAAc;EAAe;CAAa;CAE3C;EAAC;EAAe;EAAe;CAAc;CAE7C;EAAC;EAAc;EAAe;CAAa;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IAAI,aAAa,OAAO;EAAE,QAAQ;EAAM,UAAU;EAAa,cAAc;CAAQ;CAErF,IAAI,CAAC,WACH,OAAO;EAAE,QAAQ;EAAM,UAAU;EAAmB,cAAc;CAAgB;CAEpF,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["GENERIC_BOT"],"sources":["../../src/bot/index.ts"],"sourcesContent":["import type { TrackTags } from '../track/types';\nimport { GENERIC_BOT } from './generic';\n\n/**\n * What kind of automated visitor a bot is, as the analytics tools that report bots separately\n * group them (PostHog's traffic categories, Cloudflare's verified bot categories, Matomo's\n * DeviceDetector). Stored next to the name so dashboards can group without re-deriving:\n *\n * - search_crawler: indexes pages for a search engine (Googlebot, Bingbot, Baiduspider)\n * - ai_crawler: collects content to train models (GPTBot, ClaudeBot, Meta-ExternalAgent)\n * - ai_search: indexes pages for an AI search product (OAI-SearchBot, PerplexityBot)\n * - ai_assistant: fetches a page because a person asked an assistant to (ChatGPT-User)\n * - advertising: works for an ad system — reviews landing pages, targets or verifies ads\n * (Meta-ExternalAds, AdsBot-Google, Mediapartners-Google)\n * - link_preview: renders the card of a link shared in a feed or a chat (facebookexternalhit)\n * - seo_tool: SEO, marketing and page-speed tools (AhrefsBot, Lighthouse, HubSpot)\n * - monitoring: uptime checks, synthetics and service callers (Pingdom, Stripe)\n * - headless_browser: a scripted browser (HeadlessChrome, Playwright, a WebDriver session)\n * - http_client: a library or command-line client (curl, python-requests)\n * - no_user_agent: a request without a user agent, which no browser sends\n * - other: automated by every sign, but none of the above\n */\nexport const BOT_CATEGORIES = [\n 'search_crawler',\n 'ai_crawler',\n 'ai_search',\n 'ai_assistant',\n 'advertising',\n 'link_preview',\n 'seo_tool',\n 'monitoring',\n 'headless_browser',\n 'http_client',\n 'no_user_agent',\n 'other',\n] as const;\n\nexport type BotCategory = (typeof BOT_CATEGORIES)[number];\n\n/**\n * The verdict, shaped like the columns a product stores it in (`is_bot`, `bot_name`,\n * `bot_category`). A person is `{ is_bot: false, bot_name: null, bot_category: null }`.\n */\nexport type Bot =\n | { is_bot: true; bot_name: string; bot_category: BotCategory }\n | { is_bot: false; bot_name: null; bot_category: null };\n\nexport const NOT_A_BOT: Bot = { is_bot: false, bot_name: null, bot_category: null };\n\n/**\n * Bots we can name, as `[name, category, pattern]`, tried in order; the first match wins.\n *\n * Where the list comes from (checked 2026-09-30):\n * - bowser's bot parsers (the ~25 named bots its `platform.type === 'bot'` reports), which this\n * replaces.\n * - PostHog's `bot_definitions.py` (web analytics traffic classification), for the bots and\n * categories an analytics product sees most.\n * - ai.robots.txt (`robots.json`), for AI crawlers, search bots, assistants and agents.\n * - The operators' own docs for the big ones: Google's crawler list, OpenAI's and Anthropic's\n * bot pages, Meta's web crawlers, Perplexity, Bing, Apple.\n * - Bots seen in production (Meta-ExternalAds, HubSpot, Bytespider).\n * Every entry was run against the real user agents in crawler-user-agents and PostHog's\n * fixtures, and bowser's browser fixtures were run to check no browser is taken for a bot\n * (Sogou's browser against its spider, Pinterest's in-app browser against its bot); see\n * `index.test.ts` for where to get them.\n *\n * The link above each entry is the operator's page about the bot, else its product page, else\n * its Known Agents profile (knownagents.com, formerly Dark Visitors) when the operator has none.\n *\n * Names are the operators' spelling of their user agent token. Order matters where one token\n * contains another or borrows a name: advertising and SEO tools come before the search engines\n * whose names they carry, and the more specific of Meta's, Anthropic's and Perplexity's tokens\n * come first. The long tail is left to the generic pattern, filed as `other` and named by\n * `nameOfUnknownBot`; add a bot here when it is worth its own category or name in a dashboard.\n */\nexport const NAMED_BOTS = [\n // advertising: before the search crawlers, AdsBot and Mediapartners carry Google's name\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['Meta-ExternalAds', 'advertising', /meta-externalads/i],\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['facebookcatalog', 'advertising', /facebookcatalog/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-special-case-crawlers\n ['AdsBot-Google', 'advertising', /adsbot-google/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-special-case-crawlers\n ['Mediapartners-Google', 'advertising', /mediapartners-google/i],\n // https://www.bing.com/webmasters/help/which-crawlers-does-bing-use-8c184ec0\n ['AdIdxBot', 'advertising', /adidxbot/i],\n // https://support.google.com/adwords/answer/2404197\n ['Google-AdWords', 'advertising', /google-adwords/i],\n // https://support.google.com/google-ads/answer/6095821\n ['Google-Ads-Conversions', 'advertising', /google-ads-conversions/i],\n // https://developers.openai.com/api/docs/bots\n ['OAI-AdsBot', 'advertising', /oai-adsbot/i],\n // https://businesshelp.snapchat.com/s/article/adsbot-crawler\n ['SnapchatAds', 'advertising', /snapchatads/i],\n // https://www.taboola.com\n ['Taboolabot', 'advertising', /taboolabot/i],\n\n // AI assistants and agents: a person asked for this page\n // https://developers.openai.com/api/docs/bots\n ['ChatGPT-User', 'ai_assistant', /chatgpt-user/i],\n // https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler\n ['Claude-User', 'ai_assistant', /claude-user/i],\n // https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler\n ['Claude-Web', 'ai_assistant', /claude-web/i],\n // https://docs.perplexity.ai/guides/bots\n ['Perplexity-User', 'ai_assistant', /perplexity-user/i],\n // https://duckduckgo.com/duckduckgo-help-pages/results/duckassistbot\n ['DuckAssistBot', 'ai_assistant', /duckassistbot/i],\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['Meta-ExternalFetcher', 'ai_assistant', /meta-externalfetcher/i],\n // https://docs.mistral.ai/robots\n ['MistralAI-User', 'ai_assistant', /mistralai-user/i],\n // https://knownagents.com/agents/manus-user\n ['Manus-User', 'ai_assistant', /manus-user/i],\n // https://knownagents.com/agents/shap-user\n ['Shap-User', 'ai_assistant', /shap-user/i],\n // https://quillbot.com\n ['QuillBot', 'ai_assistant', /quillbot/i],\n // https://developer.amazon.com/amazonbot\n ['Amzn-User', 'ai_assistant', /amzn-user/i],\n // https://knownagents.com/agents/amazon-qbusiness\n ['amazon-QBusiness', 'ai_assistant', /amazon-qbusiness/i],\n // https://docs.aws.amazon.com/bedrock-agentcore/\n ['Amazon-Bedrock-AgentCore-Browser', 'ai_assistant', /amazon-bedrock-agentcore/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-user-triggered-fetchers\n ['Google-Agent', 'ai_assistant', /google-?agent/i],\n // https://gemini.google/overview/deep-research/\n ['Gemini-Deep-Research', 'ai_assistant', /gemini-deep-research/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-user-triggered-fetchers\n ['Google-NotebookLM', 'ai_assistant', /google-notebooklm/i],\n // https://www.kimi.ai/policies/kimi-crawlers\n ['Kimi-User', 'ai_assistant', /kimi-(?:user|agent)/i],\n // https://knownagents.com/agents/tongyibot\n ['TongyiBot', 'ai_assistant', /tongyibot/i],\n // https://knownagents.com/agents/yiyanbot\n ['YiyanBot', 'ai_assistant', /yiyanbot/i],\n // https://help.kagi.com/kagi/ai/kagi-ai.html\n ['kagi-fetcher', 'ai_assistant', /kagi-fetcher/i],\n // https://devin.ai\n ['Devin', 'ai_assistant', /\\bdevin\\/\\d/i],\n // https://knownagents.com/agents/novaact\n ['NovaAct', 'ai_assistant', /novaact/i],\n\n // AI search\n // https://developers.openai.com/api/docs/bots\n ['OAI-SearchBot', 'ai_search', /oai-searchbot/i],\n // https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler\n ['Claude-SearchBot', 'ai_search', /claude-searchbot/i],\n // https://docs.perplexity.ai/guides/bots\n ['PerplexityBot', 'ai_search', /perplexitybot/i],\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['Meta-WebIndexer', 'ai_search', /meta-webindexer/i],\n // https://developer.amazon.com/amazonbot\n ['Amazonbot', 'ai_search', /amazonbot/i],\n // https://knownagents.com/agents/youbot\n ['YouBot', 'ai_search', /youbot/i],\n // https://knownagents.com/agents/phindbot\n ['PhindBot', 'ai_search', /phindbot/i],\n // https://developer.amazon.com/amazonbot\n ['Amzn-SearchBot', 'ai_search', /amzn-searchbot/i],\n // https://knownagents.com/agents/azureai-searchbot\n ['AzureAI-SearchBot', 'ai_search', /azureai-searchbot/i],\n // https://www.kimi.ai/policies/kimi-crawlers\n ['Kimi-SearchBot', 'ai_search', /kimi-searchbot/i],\n // https://docs.mistral.ai/robots\n ['MistralAI-Index', 'ai_search', /mistralai-index/i],\n // https://knownagents.com/agents/exasearchbot\n ['ExaSearchBot', 'ai_search', /exasearchbot|\\bexabot/i],\n // https://knownagents.com/agents/tavilybot\n ['TavilyBot', 'ai_search', /tavilybot/i],\n // https://linkup.so/bot\n ['LinkupBot', 'ai_search', /linkupbot/i],\n // https://knownagents.com/agents/iaskspider\n ['iAskBot', 'ai_search', /iask(?:bot|spider)/i],\n ['Andibot', 'ai_search', /andibot/i],\n // https://developers.cloudflare.com/autorag\n ['Cloudflare-AutoRAG', 'ai_search', /cloudflare-autorag/i],\n // https://docs.parallel.ai/resources/crawler\n ['ShapBot', 'ai_search', /shapbot/i],\n\n // AI training\n // https://developers.openai.com/api/docs/bots\n ['GPTBot', 'ai_crawler', /gptbot/i],\n // https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler\n ['ClaudeBot', 'ai_crawler', /claudebot/i],\n // https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler\n ['anthropic-ai', 'ai_crawler', /anthropic-ai/i],\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['Meta-ExternalAgent', 'ai_crawler', /meta-externalagent/i],\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['FacebookBot', 'ai_crawler', /facebookbot/i],\n // https://knownagents.com/agents/bytespider\n ['Bytespider', 'ai_crawler', /bytespider/i],\n // https://commoncrawl.org/ccbot\n ['CCBot', 'ai_crawler', /ccbot/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers\n ['Google-CloudVertexBot', 'ai_crawler', /google-cloudvertexbot/i],\n // https://knownagents.com/agents/cohere-training-data-crawler\n ['cohere-ai', 'ai_crawler', /cohere-(?:ai|training-data-crawler)/i],\n // https://www.diffbot.com/docs/crawl/faq/robots-txt\n ['Diffbot', 'ai_crawler', /diffbot/i],\n // https://knownagents.com/agents/webzio-extended\n ['Omgili', 'ai_crawler', /omgili|webzio-extended/i],\n // https://imagesift.com/about\n ['ImagesiftBot', 'ai_crawler', /imagesiftbot/i],\n // https://www.timpi.io\n ['Timpibot', 'ai_crawler', /timpibot/i],\n // https://knownagents.com/agents/ai2bot\n ['AI2Bot', 'ai_crawler', /ai2bot/i],\n // https://knownagents.com/agents/pangubot\n ['PanguBot', 'ai_crawler', /pangubot/i],\n // https://knownagents.com/agents/promptingbot\n ['PromptingBot', 'ai_crawler', /promptingbot/i],\n // https://knownagents.com/agents/reflectionbot\n ['Reflectionbot', 'ai_crawler', /reflectionbot/i],\n // https://knownagents.com/agents/tiktokspider\n ['TikTokSpider', 'ai_crawler', /tiktokspider/i],\n // https://knownagents.com/agents/deepseekbot\n ['DeepSeekBot', 'ai_crawler', /deepseekbot/i],\n // https://knownagents.com/agents/doubaobot\n ['DoubaoBot', 'ai_crawler', /doubaobot/i],\n // https://knownagents.com/agents/erniebot\n ['ERNIEBot', 'ai_crawler', /erniebot/i],\n // https://knownagents.com/agents/qwenbot\n ['QwenBot', 'ai_crawler', /qwenbot/i],\n // https://www.kimi.ai/policies/kimi-crawlers\n ['KimiBot', 'ai_crawler', /kimibot/i],\n // https://knownagents.com/agents/chatglm-spider\n ['ChatGLM-Spider', 'ai_crawler', /chatglm-spider/i],\n // https://docs.mistral.ai/robots\n ['MistralAI-Training', 'ai_crawler', /mistralai-training/i],\n // https://knownagents.com/agents/yandexadditional\n ['YandexAdditional', 'ai_crawler', /yandexadditional/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers\n ['Google-Extended', 'ai_crawler', /google-extended/i],\n // https://docs.aws.amazon.com/kendra/latest/dg/what-is-kendra.html\n ['Amazon Kendra', 'ai_crawler', /amazon-kendra|kendrabot/i],\n // https://knownagents.com/agents/bedrockbot\n ['bedrockbot', 'ai_crawler', /bedrockbot/i],\n // https://brightdata.com/brightbot\n ['Brightbot', 'ai_crawler', /brightbot/i],\n // https://firecrawl.dev\n ['FirecrawlAgent', 'ai_crawler', /firecrawl/i],\n // https://github.com/unclecode/crawl4ai\n ['Crawl4AI', 'ai_crawler', /crawl4ai/i],\n // https://apify.com/apify/website-content-crawler\n ['ApifyBot', 'ai_crawler', /apify/i],\n // https://github.com/rom1504/img2dataset\n ['img2dataset', 'ai_crawler', /img2dataset/i],\n // https://knownagents.com/agents/laion-huggingface-processor\n ['LAION', 'ai_crawler', /laion/i],\n // https://developers.cloudflare.com/browser-rendering/\n ['Cloudflare Browser Rendering', 'ai_crawler', /cloudflarebrowserrendering/i],\n\n // link previews\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['facebookexternalhit', 'link_preview', /facebookexternalhit/i],\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['Facebot', 'link_preview', /facebot/i],\n // https://developer.x.com/en/docs/x-for-websites/cards/guides/getting-started\n ['Twitterbot', 'link_preview', /twitterbot/i],\n // https://www.linkedin.com/help/linkedin/answer/a521928\n ['LinkedInBot', 'link_preview', /linkedinbot/i],\n // https://api.slack.com/robots\n ['Slackbot', 'link_preview', /slackbot|slack-imgproxy/i],\n // https://discord.com\n ['Discordbot', 'link_preview', /discordbot/i],\n // https://core.telegram.org/bots\n ['TelegramBot', 'link_preview', /telegrambot/i],\n // https://www.whatsapp.com\n ['WhatsApp', 'link_preview', /^whatsapp\\//i],\n // https://www.pinterest.com/bot.html\n ['Pinterestbot', 'link_preview', /pinterestbot|^pinterest\\/0\\./i],\n // https://www.reddit.com\n ['redditbot', 'link_preview', /redditbot/i],\n // https://developers.snap.com/robots\n ['Snap URL Preview', 'link_preview', /snap url preview/i],\n // https://knownagents.com/agents/skypeuripreview\n ['SkypeUriPreview', 'link_preview', /skypeuripreview/i],\n // https://www.bing.com/webmasters/help/which-crawlers-does-bing-use-8c184ec0\n ['BingPreview', 'link_preview', /bingpreview|microsoftpreview/i],\n // https://iframely.com/docs/about\n ['Iframely', 'link_preview', /iframely/i],\n // https://embed.ly\n ['Embedly', 'link_preview', /embedly/i],\n // https://devtalk.kakao.com/t/scrap/33984\n ['KakaoTalk-scrap', 'link_preview', /kakaotalk-scrap/i],\n // https://vk.com/dev/Share\n ['vkShare', 'link_preview', /vkshare/i],\n // https://www.viber.com\n ['Viber', 'link_preview', /^viber\\b|viber-crawler/i],\n // https://github.com/bluesky-social/indigo\n ['Bluesky Cardyb', 'link_preview', /cardyb/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-user-triggered-fetchers\n ['Google-PageRenderer', 'link_preview', /google-pagerenderer/i],\n // https://vercel.com\n ['vercel-screenshot', 'link_preview', /vercel-screenshot/i],\n\n // SEO, marketing and page-speed tools; before the search crawlers, Lighthouse and the\n // Search Console tester borrow Google's name\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers\n ['Google-InspectionTool', 'seo_tool', /google-inspectiontool/i],\n // https://developer.chrome.com/docs/lighthouse\n ['Lighthouse', 'seo_tool', /chrome-lighthouse|google page speed insights/i],\n // https://gtmetrix.com\n ['GTmetrix', 'seo_tool', /gtmetrix/i],\n // https://ahrefs.com/robot\n ['AhrefsBot', 'seo_tool', /ahrefs(?:bot|siteaudit)/i],\n // https://www.semrush.com/bot/\n ['SemrushBot', 'seo_tool', /semrush/i],\n // https://mj12bot.com\n ['MJ12bot', 'seo_tool', /mj12bot/i],\n // https://moz.com/help/moz-procedures/crawlers/dotbot\n ['DotBot', 'seo_tool', /dotbot/i],\n // https://moz.com/help/moz-procedures/crawlers/rogerbot\n ['rogerbot', 'seo_tool', /rogerbot/i],\n // https://www.screamingfrog.co.uk/seo-spider/\n ['Screaming Frog', 'seo_tool', /screaming frog/i],\n // https://serpstatbot.com\n ['SerpstatBot', 'seo_tool', /serpstatbot/i],\n // https://webmeup-crawler.com\n ['BLEXBot', 'seo_tool', /blexbot/i],\n // https://dataforseo.com/dataforseo-bot\n ['DataForSeoBot', 'seo_tool', /dataforseobot/i],\n // https://knownagents.com/agents/hubspot-crawler\n ['HubSpot', 'seo_tool', /hubspot/i],\n // https://search.google.com/structured-data/testing-tool\n ['Google-Structured-Data-Testing-Tool', 'seo_tool', /google-structured-data-testing-tool/i],\n // https://www.webpagetest.org\n ['WebPageTest', 'seo_tool', /\\bptst\\/\\d/i],\n // https://www.dareboost.com\n ['DareBoost', 'seo_tool', /dareboost/i],\n // https://www.exensa.com/crawl\n ['Barkrowler', 'seo_tool', /barkrowler/i],\n // https://seranking.com/backlinks-crawler\n ['SE Ranking', 'seo_tool', /seranking|sebot-wa/i],\n // https://www.brightedge.com\n ['BrightEdge', 'seo_tool', /brightedge/i],\n // https://searchatlas.com\n ['SearchAtlas', 'seo_tool', /searchatlas/i],\n // https://www.siteimprove.com\n ['Siteimprove', 'seo_tool', /siteimprove/i],\n // https://www.dataprovider.com\n ['Dataprovider', 'seo_tool', /dataprovider\\.com/i],\n // https://www.meltwater.com\n ['Meltwater', 'seo_tool', /meltwater/i],\n // https://awario.com/bots.html\n ['Awario', 'seo_tool', /awario/i],\n\n // search engines\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers\n ['Googlebot', 'search_crawler', /googlebot/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers\n ['Storebot-Google', 'search_crawler', /storebot-google/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers\n ['GoogleOther', 'search_crawler', /googleother/i],\n // https://www.bing.com/webmasters/help/which-crawlers-does-bing-use-8c184ec0\n ['Bingbot', 'search_crawler', /bingbot/i],\n // https://support.apple.com/en-us/119829\n ['Applebot', 'search_crawler', /applebot/i],\n // https://www.baidu.com/search/spider.html\n ['Baiduspider', 'search_crawler', /baiduspider/i],\n // https://yandex.com/support/webmaster/robot-workings/check-yandex-robots.html\n ['YandexBot', 'search_crawler', /yandex(?:\\w*bot|images|metrika)/i],\n // https://duckduckgo.com/duckduckgo-help-pages/results/duckduckbot\n ['DuckDuckBot', 'search_crawler', /duckduckbot/i],\n // https://help.yahoo.com/kb/SLN22600.html\n ['Yahoo Slurp', 'search_crawler', /yahoo!?[\\s/]*slurp/i],\n // https://www.sogou.com/docs/help/webmasters.htm#07\n ['Sogou', 'search_crawler', /sogou[\\w\\s-]*spider/i],\n // https://www.so.com/help/help_3_2.html\n ['360Spider', 'search_crawler', /360spider|haosouspider/i],\n // https://knownagents.com/agents/yisouspider\n ['YisouSpider', 'search_crawler', /yisouspider/i],\n // https://webmaster.petalsearch.com/site/petalbot\n ['PetalBot', 'search_crawler', /petalbot/i],\n // https://napoveda.seznam.cz/en/seznambot-intro/\n ['SeznamBot', 'search_crawler', /seznambot/i],\n // https://knownagents.com/agents/yeti\n ['Yeti', 'search_crawler', /\\byeti\\//i],\n // https://help2.line.me/linesearchbot/web/?contentId=50006055&lang=en\n ['Linespider', 'search_crawler', /linespider/i],\n // https://help.qwant.com/bot/\n ['Qwantbot', 'search_crawler', /qwant(?:bot|ify)/i],\n // https://help.coccoc.com/searchengine\n ['coccocbot', 'search_crawler', /coccocbot/i],\n // https://www.mojeek.com/bot.html\n ['MojeekBot', 'search_crawler', /mojeekbot/i],\n // https://search.brave.com/help/brave-search-crawler\n ['Bravebot', 'search_crawler', /bravebot/i],\n // https://bot.seekport.com\n ['SeekportBot', 'search_crawler', /seekport/i],\n // https://mwmbl.org\n ['mwmbl', 'search_crawler', /mwmbl/i],\n // https://archive.org/details/archive.org_bot\n ['Internet Archive', 'search_crawler', /archive\\.org_bot|ia_archiver|archive-it|archiveteam/i],\n\n // monitoring, synthetics, security and consent scanners, service callers\n // https://www.pingdom.com\n ['Pingdom', 'monitoring', /pingdom/i],\n // https://uptimerobot.com\n ['UptimeRobot', 'monitoring', /uptimerobot/i],\n // https://www.statuscake.com\n ['StatusCake', 'monitoring', /statuscake/i],\n // https://www.site24x7.com\n ['Site24x7', 'monitoring', /site24x7/i],\n // https://betterstack.com/docs/uptime/\n ['Better Stack', 'monitoring', /better ?uptime|betterstack/i],\n // https://docs.datadoghq.com/synthetics/\n ['Datadog', 'monitoring', /datadog/i],\n // https://www.checklyhq.com/docs/\n ['Checkly', 'monitoring', /checkly/i],\n // https://docs.newrelic.com/docs/synthetics/\n ['NewRelicPinger', 'monitoring', /newrelicpinger/i],\n // https://github.com/louislam/uptime-kuma\n ['Uptime-Kuma', 'monitoring', /uptime-kuma/i],\n // https://grafana.com/docs/grafana-cloud/testing/synthetic-monitoring/\n ['Grafana Synthetic Monitoring', 'monitoring', /grafanasyntheticmonitoring/i],\n // https://docs.dynatrace.com/docs/observe/digital-experience/synthetic-monitoring\n ['Dynatrace', 'monitoring', /ruxitsynthetic|dynatrace/i],\n // https://docs.splunk.com/observability/en/synthetics/intro-synthetics.html\n ['Splunk', 'monitoring', /splunk/i],\n // https://www.catchpoint.com\n ['Catchpoint', 'monitoring', /catchpoint/i],\n // https://ghostinspector.com\n ['Ghost Inspector', 'monitoring', /ghost inspector/i],\n // https://docs.digitalocean.com/products/uptime/\n ['DigitalOcean Uptime', 'monitoring', /digitalocean uptime/i],\n // https://ohdear.app/docs/faq/what-is-the-oh-dear-checker\n ['OhDear', 'monitoring', /ohdear/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-special-case-crawlers\n ['Google-Safety', 'monitoring', /google-safety/i],\n // https://www.cookiebot.com\n ['Cookiebot', 'monitoring', /cookiebot/i],\n // https://knownagents.com/agents/onetrust-cmp-scanner\n ['OneTrust', 'monitoring', /onetrust/i],\n // https://www.cookiehub.com\n ['CookieHub', 'monitoring', /cookiehub/i],\n // https://detectify.com/bot/\n ['Detectify', 'monitoring', /detectify/i],\n // https://about.censys.io\n ['CensysInspect', 'monitoring', /censysinspect/i],\n // https://www.bitsight.com\n ['BitSightBot', 'monitoring', /bitsightbot/i],\n // https://github.com/zmap/zgrab2\n ['zgrab', 'monitoring', /zgrab/i],\n // https://nmap.org/book/nse.html\n ['Nmap', 'monitoring', /nmap scripting engine/i],\n // https://docs.stripe.com/webhooks\n ['Stripe', 'monitoring', /stripe\\/1\\.0|stripebot|merchantsecurityscanner/i],\n\n // scripted browsers\n // https://developer.chrome.com/docs/chromium/headless\n ['HeadlessChrome', 'headless_browser', /headlesschrome/i],\n // https://phantomjs.org\n ['PhantomJS', 'headless_browser', /phantomjs/i],\n // https://slimerjs.org\n ['SlimerJS', 'headless_browser', /slimerjs/i],\n // https://playwright.dev\n ['Playwright', 'headless_browser', /playwright/i],\n // https://pptr.dev\n ['Puppeteer', 'headless_browser', /puppeteer/i],\n // https://www.selenium.dev\n ['Selenium', 'headless_browser', /selenium/i],\n // https://www.cypress.io\n ['Cypress', 'headless_browser', /cypress/i],\n // https://lightpanda.io\n ['Lightpanda', 'headless_browser', /lightpanda/i],\n // https://wkhtmltopdf.org\n ['wkhtmltopdf', 'headless_browser', /wkhtmltopdf/i],\n\n // libraries and command-line clients\n // https://curl.se\n ['curl', 'http_client', /^curl\\//i],\n // https://www.gnu.org/software/wget/\n ['Wget', 'http_client', /^wget\\//i],\n // https://requests.readthedocs.io\n ['python-requests', 'http_client', /python-requests/i],\n // https://docs.python.org/3/library/urllib.request.html\n ['python-urllib', 'http_client', /python-urllib/i],\n // https://docs.aiohttp.org\n ['aiohttp', 'http_client', /aiohttp/i],\n // https://www.python-httpx.org\n ['httpx', 'http_client', /python-httpx|^httpx\\//i],\n // https://scrapy.org\n ['Scrapy', 'http_client', /scrapy/i],\n // https://pkg.go.dev/net/http\n ['Go-http-client', 'http_client', /go-http-client/i],\n // https://github.com/square/okhttp\n ['okhttp', 'http_client', /^okhttp\\//i],\n // https://hc.apache.org/httpcomponents-client-5.5.x/\n ['Java', 'http_client', /^java\\/|apache-httpclient/i],\n // https://axios-http.com\n ['axios', 'http_client', /^axios\\//i],\n // https://github.com/node-fetch/node-fetch\n ['node-fetch', 'http_client', /node-fetch/i],\n // https://undici.nodejs.org\n ['undici', 'http_client', /^undici/i],\n // https://www.postman.com\n ['PostmanRuntime', 'http_client', /postmanruntime/i],\n // https://insomnia.rest\n ['insomnia', 'http_client', /^insomnia\\//i],\n // https://metacpan.org/pod/LWP\n ['libwww-perl', 'http_client', /libwww-perl/i],\n // https://docs.guzzlephp.org\n ['Guzzle', 'http_client', /guzzlehttp/i],\n // https://developers.google.com/apps-script/reference/url-fetch\n ['Google-Apps-Script', 'http_client', /google-apps-script/i],\n // https://support.google.com/docs/answer/3093339\n ['GoogleDocs', 'http_client', /googledocs/i],\n] as const satisfies readonly (readonly [string, BotCategory, RegExp])[];\n\nconst botishToken =\n /\\b([\\w.-]*?(?:bot|crawler|spider|scraper|fetcher|agent|preview|checker|monitor)[\\w-]*)\\b/i;\nconst botishWord = /^(?:bot|crawler|spider|scraper|fetcher|agent|preview|checker|monitor)$/i;\nconst compatibleToken = /compatible;\\s*([a-z][\\w.-]*(?: [a-z][\\w.-]*)?)/i;\nconst productTokens = /([a-z][\\w.-]*)\\/\\d/gi;\nconst browserToken =\n /^(?:mozilla|applewebkit|khtml|gecko|chrome|chromium|safari|version|mobile|firefox|edg|edge|opr|msie|trident)$/i;\n\n/**\n * A name for a bot that is not in the named table, from the first of: a token that sounds like\n * one (`Bytespider`, `ABEvalBot`), the name after `compatible;` (`Google-Read-Aloud`), a product\n * token that is not a browser's (`Barkrowler/0.5`), what the generic pattern matched. URLs and\n * email addresses are dropped first, as nearly every crawler links its docs.\n */\nexport function nameOfUnknownBot(userAgent: string, matched: string): string {\n const text = userAgent\n .replace(/\\+?https?:\\/\\/\\S+/gi, ' ')\n .replace(/[\\w.+-]+@[\\w-]+(?:\\.[\\w-]+)+/g, ' ');\n\n const botish = botishToken.exec(text)?.[1];\n if (botish && !botishWord.test(botish)) return botish.slice(0, 64);\n\n const compatible = compatibleToken.exec(text)?.[1];\n if (compatible && !browserToken.test(compatible)) return compatible.slice(0, 64);\n\n for (const [, product] of text.matchAll(productTokens)) {\n if (!browserToken.test(product)) return product.slice(0, 64);\n }\n\n return matched.replace(/^\\W+|\\W+$/g, '').slice(0, 64) || 'unknown';\n}\n\n/**\n * The request user agent of a page opened in Facebook's or Instagram's in-app browser when the\n * app sends the page's requests through its own network stack: `[FBAN/FB4A;FBAV/…]`,\n * `Instagram 445.0.0.34.44 (iPhone18,1; iOS 26_6_1; …) AppleWebKit/420+`. The page itself still\n * reads a browser's `navigator.userAgent`, which is why PostHog, GA4 and Matomo see a person.\n * isbot's generic pattern takes both for bots (a long token with no space, a product token that is\n * no browser's), so they are people here before it runs. Meta's ad prefetch loads only the HTML,\n * which runs no script and creates no visitor. The in-app browser's own user agent starts with\n * `Mozilla/5.0`, so the anchors leave it alone.\n */\nconst META_APP = /^\\[FBAN\\/|^Instagram \\d+(?:\\.\\d+)+ \\(/;\n\n/**\n * Whether a web visitor is a bot, which one, and what kind. Run on the server when the visitor\n * is created, with the tags it was created with: the user agent is the request's header\n * (`tags.user_agent`, which the server writes), not anything the client says about itself, so\n * the verdict can be recomputed from stored tags when the rules change.\n *\n * Call it for web visitors only: a native app's requests carry an HTTP library's user agent\n * (CFNetwork, okhttp) that would read as a bot, and no crawler runs the app.\n *\n * In order: a bot we can name; a browser driven by WebDriver (`tags.webdriver`, which the SDK\n * sets from `navigator.webdriver`, the one sign a scripted browser with a normal user agent\n * gives); a person in a Meta app (`META_APP`); anything the generic pattern calls automated; no\n * user agent at all.\n */\nexport function botOf(tags: TrackTags): Bot {\n const userAgent = typeof tags.user_agent === 'string' ? tags.user_agent.trim() : '';\n\n for (const [name, category, pattern] of NAMED_BOTS) {\n if (pattern.test(userAgent)) return { is_bot: true, bot_name: name, bot_category: category };\n }\n\n const generic = userAgent ? GENERIC_BOT.exec(userAgent) : null;\n const unknownName = generic ? nameOfUnknownBot(userAgent, generic[0]) : null;\n\n // A scripted browser that says so in its user agent takes that name, else it is just WebDriver.\n if (tags.webdriver === true) {\n return { is_bot: true, bot_name: unknownName ?? 'WebDriver', bot_category: 'headless_browser' };\n }\n\n if (META_APP.test(userAgent)) return NOT_A_BOT;\n\n if (unknownName) return { is_bot: true, bot_name: unknownName, bot_category: 'other' };\n\n if (!userAgent)\n return { is_bot: true, bot_name: '(no user agent)', bot_category: 'no_user_agent' };\n\n return NOT_A_BOT;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAa,iBAAiB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAYA,MAAa,YAAiB;CAAE,QAAQ;CAAO,UAAU;CAAM,cAAc;AAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BlF,MAAa,aAAa;CAGxB;EAAC;EAAoB;EAAe;CAAmB;CAEvD;EAAC;EAAmB;EAAe;CAAkB;CAErD;EAAC;EAAiB;EAAe;CAAgB;CAEjD;EAAC;EAAwB;EAAe;CAAuB;CAE/D;EAAC;EAAY;EAAe;CAAW;CAEvC;EAAC;EAAkB;EAAe;CAAiB;CAEnD;EAAC;EAA0B;EAAe;CAAyB;CAEnE;EAAC;EAAc;EAAe;CAAa;CAE3C;EAAC;EAAe;EAAe;CAAc;CAE7C;EAAC;EAAc;EAAe;CAAa;CAI3C;EAAC;EAAgB;EAAgB;CAAe;CAEhD;EAAC;EAAe;EAAgB;CAAc;CAE9C;EAAC;EAAc;EAAgB;CAAa;CAE5C;EAAC;EAAmB;EAAgB;CAAkB;CAEtD;EAAC;EAAiB;EAAgB;CAAgB;CAElD;EAAC;EAAwB;EAAgB;CAAuB;CAEhE;EAAC;EAAkB;EAAgB;CAAiB;CAEpD;EAAC;EAAc;EAAgB;CAAa;CAE5C;EAAC;EAAa;EAAgB;CAAY;CAE1C;EAAC;EAAY;EAAgB;CAAW;CAExC;EAAC;EAAa;EAAgB;CAAY;CAE1C;EAAC;E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OAAO;AACT"}
|
package/dist/bot/index.d.cts
CHANGED
|
@@ -61,7 +61,7 @@ export declare const NOT_A_BOT: Bot;
|
|
|
61
61
|
* come first. The long tail is left to the generic pattern, filed as `other` and named by
|
|
62
62
|
* `nameOfUnknownBot`; add a bot here when it is worth its own category or name in a dashboard.
|
|
63
63
|
*/
|
|
64
|
-
export declare const NAMED_BOTS: readonly [readonly ["Meta-ExternalAds", "advertising", RegExp], readonly ["facebookcatalog", "advertising", RegExp], readonly ["AdsBot-Google", "advertising", RegExp], readonly ["Mediapartners-Google", "advertising", RegExp], readonly ["AdIdxBot", "advertising", RegExp], readonly ["Google-AdWords", "advertising", RegExp], readonly ["Google-Ads-Conversions", "advertising", RegExp], readonly ["OAI-AdsBot", "advertising", RegExp], readonly ["SnapchatAds", "advertising", RegExp], readonly ["Taboolabot", "advertising", RegExp], readonly ["ChatGPT-User", "ai_assistant", RegExp], readonly ["Claude-User", "ai_assistant", RegExp], readonly ["Claude-Web", "ai_assistant", RegExp], readonly ["Perplexity-User", "ai_assistant", RegExp], readonly ["DuckAssistBot", "ai_assistant", RegExp], readonly ["Meta-ExternalFetcher", "ai_assistant", RegExp], readonly ["MistralAI-User", "ai_assistant", RegExp], readonly ["Manus-User", "ai_assistant", RegExp], readonly ["Amzn-User", "ai_assistant", RegExp], readonly ["amazon-QBusiness", "ai_assistant", RegExp], readonly ["Amazon-Bedrock-AgentCore-Browser", "ai_assistant", RegExp], readonly ["Google-Agent", "ai_assistant", RegExp], readonly ["Gemini-Deep-Research", "ai_assistant", RegExp], readonly ["Google-NotebookLM", "ai_assistant", RegExp], readonly ["Kimi-User", "ai_assistant", RegExp], readonly ["TongyiBot", "ai_assistant", RegExp], readonly ["YiyanBot", "ai_assistant", RegExp], readonly ["kagi-fetcher", "ai_assistant", RegExp], readonly ["Devin", "ai_assistant", RegExp], readonly ["NovaAct", "ai_assistant", RegExp], readonly ["OAI-SearchBot", "ai_search", RegExp], readonly ["Claude-SearchBot", "ai_search", RegExp], readonly ["PerplexityBot", "ai_search", RegExp], readonly ["Meta-WebIndexer", "ai_search", RegExp], readonly ["Amazonbot", "ai_search", RegExp], readonly ["YouBot", "ai_search", RegExp], readonly ["PhindBot", "ai_search", RegExp], readonly ["Amzn-SearchBot", "ai_search", RegExp], readonly ["AzureAI-SearchBot", "ai_search", RegExp], readonly ["Kimi-SearchBot", "ai_search", RegExp], readonly ["MistralAI-Index", "ai_search", RegExp], readonly ["ExaSearchBot", "ai_search", RegExp], readonly ["TavilyBot", "ai_search", RegExp], readonly ["LinkupBot", "ai_search", RegExp], readonly ["iAskBot", "ai_search", RegExp], readonly ["Andibot", "ai_search", RegExp], readonly ["Cloudflare-AutoRAG", "ai_search", RegExp], readonly ["GPTBot", "ai_crawler", RegExp], readonly ["ClaudeBot", "ai_crawler", RegExp], readonly ["anthropic-ai", "ai_crawler", RegExp], readonly ["Meta-ExternalAgent", "ai_crawler", RegExp], readonly ["FacebookBot", "ai_crawler", RegExp], readonly ["Bytespider", "ai_crawler", RegExp], readonly ["CCBot", "ai_crawler", RegExp], readonly ["Google-CloudVertexBot", "ai_crawler", RegExp], readonly ["cohere-ai", "ai_crawler", RegExp], readonly ["Diffbot", "ai_crawler", RegExp], readonly ["Omgili", "ai_crawler", RegExp], readonly ["ImagesiftBot", "ai_crawler", RegExp], readonly ["Timpibot", "ai_crawler", RegExp], readonly ["AI2Bot", "ai_crawler", RegExp], readonly ["PanguBot", "ai_crawler", RegExp], readonly ["TikTokSpider", "ai_crawler", RegExp], readonly ["DeepSeekBot", "ai_crawler", RegExp], readonly ["DoubaoBot", "ai_crawler", RegExp], readonly ["ERNIEBot", "ai_crawler", RegExp], readonly ["QwenBot", "ai_crawler", RegExp], readonly ["KimiBot", "ai_crawler", RegExp], readonly ["ChatGLM-Spider", "ai_crawler", RegExp], readonly ["MistralAI-Training", "ai_crawler", RegExp], readonly ["YandexAdditional", "ai_crawler", RegExp], readonly ["Google-Extended", "ai_crawler", RegExp], readonly ["Amazon Kendra", "ai_crawler", RegExp], readonly ["bedrockbot", "ai_crawler", RegExp], readonly ["Brightbot", "ai_crawler", RegExp], readonly ["FirecrawlAgent", "ai_crawler", RegExp], readonly ["Crawl4AI", "ai_crawler", RegExp], readonly ["ApifyBot", "ai_crawler", RegExp], readonly ["img2dataset", "ai_crawler", RegExp], readonly ["LAION", "ai_crawler", RegExp], readonly ["Cloudflare Browser Rendering", "ai_crawler", RegExp], readonly ["facebookexternalhit", "link_preview", RegExp], readonly ["Facebot", "link_preview", RegExp], readonly ["Twitterbot", "link_preview", RegExp], readonly ["LinkedInBot", "link_preview", RegExp], readonly ["Slackbot", "link_preview", RegExp], readonly ["Discordbot", "link_preview", RegExp], readonly ["TelegramBot", "link_preview", RegExp], readonly ["WhatsApp", "link_preview", RegExp], readonly ["Pinterestbot", "link_preview", RegExp], readonly ["redditbot", "link_preview", RegExp], readonly ["Snap URL Preview", "link_preview", RegExp], readonly ["SkypeUriPreview", "link_preview", RegExp], readonly ["BingPreview", "link_preview", RegExp], readonly ["Iframely", "link_preview", RegExp], readonly ["Embedly", "link_preview", RegExp], readonly ["KakaoTalk-scrap", "link_preview", RegExp], readonly ["vkShare", "link_preview", RegExp], readonly ["Viber", "link_preview", RegExp], readonly ["Bluesky Cardyb", "link_preview", RegExp], readonly ["Google-PageRenderer", "link_preview", RegExp], readonly ["vercel-screenshot", "link_preview", RegExp], readonly ["Google-InspectionTool", "seo_tool", RegExp], readonly ["Lighthouse", "seo_tool", RegExp], readonly ["GTmetrix", "seo_tool", RegExp], readonly ["AhrefsBot", "seo_tool", RegExp], readonly ["SemrushBot", "seo_tool", RegExp], readonly ["MJ12bot", "seo_tool", RegExp], readonly ["DotBot", "seo_tool", RegExp], readonly ["rogerbot", "seo_tool", RegExp], readonly ["Screaming Frog", "seo_tool", RegExp], readonly ["SerpstatBot", "seo_tool", RegExp], readonly ["BLEXBot", "seo_tool", RegExp], readonly ["DataForSeoBot", "seo_tool", RegExp], readonly ["HubSpot", "seo_tool", RegExp], readonly ["Google-Structured-Data-Testing-Tool", "seo_tool", RegExp], readonly ["WebPageTest", "seo_tool", RegExp], readonly ["DareBoost", "seo_tool", RegExp], readonly ["Barkrowler", "seo_tool", RegExp], readonly ["SE Ranking", "seo_tool", RegExp], readonly ["BrightEdge", "seo_tool", RegExp], readonly ["SearchAtlas", "seo_tool", RegExp], readonly ["Siteimprove", "seo_tool", RegExp], readonly ["Dataprovider", "seo_tool", RegExp], readonly ["Meltwater", "seo_tool", RegExp], readonly ["Awario", "seo_tool", RegExp], readonly ["Googlebot", "search_crawler", RegExp], readonly ["Storebot-Google", "search_crawler", RegExp], readonly ["GoogleOther", "search_crawler", RegExp], readonly ["Bingbot", "search_crawler", RegExp], readonly ["Applebot", "search_crawler", RegExp], readonly ["Baiduspider", "search_crawler", RegExp], readonly ["YandexBot", "search_crawler", RegExp], readonly ["DuckDuckBot", "search_crawler", RegExp], readonly ["Yahoo Slurp", "search_crawler", RegExp], readonly ["Sogou", "search_crawler", RegExp], readonly ["360Spider", "search_crawler", RegExp], readonly ["YisouSpider", "search_crawler", RegExp], readonly ["PetalBot", "search_crawler", RegExp], readonly ["SeznamBot", "search_crawler", RegExp], readonly ["Yeti", "search_crawler", RegExp], readonly ["Linespider", "search_crawler", RegExp], readonly ["Qwantbot", "search_crawler", RegExp], readonly ["coccocbot", "search_crawler", RegExp], readonly ["MojeekBot", "search_crawler", RegExp], readonly ["Bravebot", "search_crawler", RegExp], readonly ["SeekportBot", "search_crawler", RegExp], readonly ["mwmbl", "search_crawler", RegExp], readonly ["Internet Archive", "search_crawler", RegExp], readonly ["Pingdom", "monitoring", RegExp], readonly ["UptimeRobot", "monitoring", RegExp], readonly ["StatusCake", "monitoring", RegExp], readonly ["Site24x7", "monitoring", RegExp], readonly ["Better Stack", "monitoring", RegExp], readonly ["Datadog", "monitoring", RegExp], readonly ["Checkly", "monitoring", RegExp], readonly ["NewRelicPinger", "monitoring", RegExp], readonly ["Uptime-Kuma", "monitoring", RegExp], readonly ["Grafana Synthetic Monitoring", "monitoring", RegExp], readonly ["Dynatrace", "monitoring", RegExp], readonly ["Splunk", "monitoring", RegExp], readonly ["Catchpoint", "monitoring", RegExp], readonly ["Ghost Inspector", "monitoring", RegExp], readonly ["DigitalOcean Uptime", "monitoring", RegExp], readonly ["OhDear", "monitoring", RegExp], readonly ["Google-Safety", "monitoring", RegExp], readonly ["Cookiebot", "monitoring", RegExp], readonly ["OneTrust", "monitoring", RegExp], readonly ["CookieHub", "monitoring", RegExp], readonly ["Detectify", "monitoring", RegExp], readonly ["CensysInspect", "monitoring", RegExp], readonly ["BitSightBot", "monitoring", RegExp], readonly ["zgrab", "monitoring", RegExp], readonly ["Nmap", "monitoring", RegExp], readonly ["Stripe", "monitoring", RegExp], readonly ["HeadlessChrome", "headless_browser", RegExp], readonly ["PhantomJS", "headless_browser", RegExp], readonly ["SlimerJS", "headless_browser", RegExp], readonly ["Playwright", "headless_browser", RegExp], readonly ["Puppeteer", "headless_browser", RegExp], readonly ["Selenium", "headless_browser", RegExp], readonly ["Cypress", "headless_browser", RegExp], readonly ["Lightpanda", "headless_browser", RegExp], readonly ["wkhtmltopdf", "headless_browser", RegExp], readonly ["curl", "http_client", RegExp], readonly ["Wget", "http_client", RegExp], readonly ["python-requests", "http_client", RegExp], readonly ["python-urllib", "http_client", RegExp], readonly ["aiohttp", "http_client", RegExp], readonly ["httpx", "http_client", RegExp], readonly ["Scrapy", "http_client", RegExp], readonly ["Go-http-client", "http_client", RegExp], readonly ["okhttp", "http_client", RegExp], readonly ["Java", "http_client", RegExp], readonly ["axios", "http_client", RegExp], readonly ["node-fetch", "http_client", RegExp], readonly ["undici", "http_client", RegExp], readonly ["PostmanRuntime", "http_client", RegExp], readonly ["insomnia", "http_client", RegExp], readonly ["libwww-perl", "http_client", RegExp], readonly ["Guzzle", "http_client", RegExp], readonly ["Google-Apps-Script", "http_client", RegExp], readonly ["GoogleDocs", "http_client", RegExp]];
|
|
64
|
+
export declare const NAMED_BOTS: readonly [readonly ["Meta-ExternalAds", "advertising", RegExp], readonly ["facebookcatalog", "advertising", RegExp], readonly ["AdsBot-Google", "advertising", RegExp], readonly ["Mediapartners-Google", "advertising", RegExp], readonly ["AdIdxBot", "advertising", RegExp], readonly ["Google-AdWords", "advertising", RegExp], readonly ["Google-Ads-Conversions", "advertising", RegExp], readonly ["OAI-AdsBot", "advertising", RegExp], readonly ["SnapchatAds", "advertising", RegExp], readonly ["Taboolabot", "advertising", RegExp], readonly ["ChatGPT-User", "ai_assistant", RegExp], readonly ["Claude-User", "ai_assistant", RegExp], readonly ["Claude-Web", "ai_assistant", RegExp], readonly ["Perplexity-User", "ai_assistant", RegExp], readonly ["DuckAssistBot", "ai_assistant", RegExp], readonly ["Meta-ExternalFetcher", "ai_assistant", RegExp], readonly ["MistralAI-User", "ai_assistant", RegExp], readonly ["Manus-User", "ai_assistant", RegExp], readonly ["Shap-User", "ai_assistant", RegExp], readonly ["QuillBot", "ai_assistant", RegExp], readonly ["Amzn-User", "ai_assistant", RegExp], readonly ["amazon-QBusiness", "ai_assistant", RegExp], readonly ["Amazon-Bedrock-AgentCore-Browser", "ai_assistant", RegExp], readonly ["Google-Agent", "ai_assistant", RegExp], readonly ["Gemini-Deep-Research", "ai_assistant", RegExp], readonly ["Google-NotebookLM", "ai_assistant", RegExp], readonly ["Kimi-User", "ai_assistant", RegExp], readonly ["TongyiBot", "ai_assistant", RegExp], readonly ["YiyanBot", "ai_assistant", RegExp], readonly ["kagi-fetcher", "ai_assistant", RegExp], readonly ["Devin", "ai_assistant", RegExp], readonly ["NovaAct", "ai_assistant", RegExp], readonly ["OAI-SearchBot", "ai_search", RegExp], readonly ["Claude-SearchBot", "ai_search", RegExp], readonly ["PerplexityBot", "ai_search", RegExp], readonly ["Meta-WebIndexer", "ai_search", RegExp], readonly ["Amazonbot", "ai_search", RegExp], readonly ["YouBot", "ai_search", RegExp], readonly ["PhindBot", "ai_search", RegExp], readonly ["Amzn-SearchBot", "ai_search", RegExp], readonly ["AzureAI-SearchBot", "ai_search", RegExp], readonly ["Kimi-SearchBot", "ai_search", RegExp], readonly ["MistralAI-Index", "ai_search", RegExp], readonly ["ExaSearchBot", "ai_search", RegExp], readonly ["TavilyBot", "ai_search", RegExp], readonly ["LinkupBot", "ai_search", RegExp], readonly ["iAskBot", "ai_search", RegExp], readonly ["Andibot", "ai_search", RegExp], readonly ["Cloudflare-AutoRAG", "ai_search", RegExp], readonly ["ShapBot", "ai_search", RegExp], readonly ["GPTBot", "ai_crawler", RegExp], readonly ["ClaudeBot", "ai_crawler", RegExp], readonly ["anthropic-ai", "ai_crawler", RegExp], readonly ["Meta-ExternalAgent", "ai_crawler", RegExp], readonly ["FacebookBot", "ai_crawler", RegExp], readonly ["Bytespider", "ai_crawler", RegExp], readonly ["CCBot", "ai_crawler", RegExp], readonly ["Google-CloudVertexBot", "ai_crawler", RegExp], readonly ["cohere-ai", "ai_crawler", RegExp], readonly ["Diffbot", "ai_crawler", RegExp], readonly ["Omgili", "ai_crawler", RegExp], readonly ["ImagesiftBot", "ai_crawler", RegExp], readonly ["Timpibot", "ai_crawler", RegExp], readonly ["AI2Bot", "ai_crawler", RegExp], readonly ["PanguBot", "ai_crawler", RegExp], readonly ["PromptingBot", "ai_crawler", RegExp], readonly ["Reflectionbot", "ai_crawler", RegExp], readonly ["TikTokSpider", "ai_crawler", RegExp], readonly ["DeepSeekBot", "ai_crawler", RegExp], readonly ["DoubaoBot", "ai_crawler", RegExp], readonly ["ERNIEBot", "ai_crawler", RegExp], readonly ["QwenBot", "ai_crawler", RegExp], readonly ["KimiBot", "ai_crawler", RegExp], readonly ["ChatGLM-Spider", "ai_crawler", RegExp], readonly ["MistralAI-Training", "ai_crawler", RegExp], readonly ["YandexAdditional", "ai_crawler", RegExp], readonly ["Google-Extended", "ai_crawler", RegExp], readonly ["Amazon Kendra", "ai_crawler", RegExp], readonly ["bedrockbot", "ai_crawler", RegExp], readonly ["Brightbot", "ai_crawler", RegExp], readonly ["FirecrawlAgent", "ai_crawler", RegExp], readonly ["Crawl4AI", "ai_crawler", RegExp], readonly ["ApifyBot", "ai_crawler", RegExp], readonly ["img2dataset", "ai_crawler", RegExp], readonly ["LAION", "ai_crawler", RegExp], readonly ["Cloudflare Browser Rendering", "ai_crawler", RegExp], readonly ["facebookexternalhit", "link_preview", RegExp], readonly ["Facebot", "link_preview", RegExp], readonly ["Twitterbot", "link_preview", RegExp], readonly ["LinkedInBot", "link_preview", RegExp], readonly ["Slackbot", "link_preview", RegExp], readonly ["Discordbot", "link_preview", RegExp], readonly ["TelegramBot", "link_preview", RegExp], readonly ["WhatsApp", "link_preview", RegExp], readonly ["Pinterestbot", "link_preview", RegExp], readonly ["redditbot", "link_preview", RegExp], readonly ["Snap URL Preview", "link_preview", RegExp], readonly ["SkypeUriPreview", "link_preview", RegExp], readonly ["BingPreview", "link_preview", RegExp], readonly ["Iframely", "link_preview", RegExp], readonly ["Embedly", "link_preview", RegExp], readonly ["KakaoTalk-scrap", "link_preview", RegExp], readonly ["vkShare", "link_preview", RegExp], readonly ["Viber", "link_preview", RegExp], readonly ["Bluesky Cardyb", "link_preview", RegExp], readonly ["Google-PageRenderer", "link_preview", RegExp], readonly ["vercel-screenshot", "link_preview", RegExp], readonly ["Google-InspectionTool", "seo_tool", RegExp], readonly ["Lighthouse", "seo_tool", RegExp], readonly ["GTmetrix", "seo_tool", RegExp], readonly ["AhrefsBot", "seo_tool", RegExp], readonly ["SemrushBot", "seo_tool", RegExp], readonly ["MJ12bot", "seo_tool", RegExp], readonly ["DotBot", "seo_tool", RegExp], readonly ["rogerbot", "seo_tool", RegExp], readonly ["Screaming Frog", "seo_tool", RegExp], readonly ["SerpstatBot", "seo_tool", RegExp], readonly ["BLEXBot", "seo_tool", RegExp], readonly ["DataForSeoBot", "seo_tool", RegExp], readonly ["HubSpot", "seo_tool", RegExp], readonly ["Google-Structured-Data-Testing-Tool", "seo_tool", RegExp], readonly ["WebPageTest", "seo_tool", RegExp], readonly ["DareBoost", "seo_tool", RegExp], readonly ["Barkrowler", "seo_tool", RegExp], readonly ["SE Ranking", "seo_tool", RegExp], readonly ["BrightEdge", "seo_tool", RegExp], readonly ["SearchAtlas", "seo_tool", RegExp], readonly ["Siteimprove", "seo_tool", RegExp], readonly ["Dataprovider", "seo_tool", RegExp], readonly ["Meltwater", "seo_tool", RegExp], readonly ["Awario", "seo_tool", RegExp], readonly ["Googlebot", "search_crawler", RegExp], readonly ["Storebot-Google", "search_crawler", RegExp], readonly ["GoogleOther", "search_crawler", RegExp], readonly ["Bingbot", "search_crawler", RegExp], readonly ["Applebot", "search_crawler", RegExp], readonly ["Baiduspider", "search_crawler", RegExp], readonly ["YandexBot", "search_crawler", RegExp], readonly ["DuckDuckBot", "search_crawler", RegExp], readonly ["Yahoo Slurp", "search_crawler", RegExp], readonly ["Sogou", "search_crawler", RegExp], readonly ["360Spider", "search_crawler", RegExp], readonly ["YisouSpider", "search_crawler", RegExp], readonly ["PetalBot", "search_crawler", RegExp], readonly ["SeznamBot", "search_crawler", RegExp], readonly ["Yeti", "search_crawler", RegExp], readonly ["Linespider", "search_crawler", RegExp], readonly ["Qwantbot", "search_crawler", RegExp], readonly ["coccocbot", "search_crawler", RegExp], readonly ["MojeekBot", "search_crawler", RegExp], readonly ["Bravebot", "search_crawler", RegExp], readonly ["SeekportBot", "search_crawler", RegExp], readonly ["mwmbl", "search_crawler", RegExp], readonly ["Internet Archive", "search_crawler", RegExp], readonly ["Pingdom", "monitoring", RegExp], readonly ["UptimeRobot", "monitoring", RegExp], readonly ["StatusCake", "monitoring", RegExp], readonly ["Site24x7", "monitoring", RegExp], readonly ["Better Stack", "monitoring", RegExp], readonly ["Datadog", "monitoring", RegExp], readonly ["Checkly", "monitoring", RegExp], readonly ["NewRelicPinger", "monitoring", RegExp], readonly ["Uptime-Kuma", "monitoring", RegExp], readonly ["Grafana Synthetic Monitoring", "monitoring", RegExp], readonly ["Dynatrace", "monitoring", RegExp], readonly ["Splunk", "monitoring", RegExp], readonly ["Catchpoint", "monitoring", RegExp], readonly ["Ghost Inspector", "monitoring", RegExp], readonly ["DigitalOcean Uptime", "monitoring", RegExp], readonly ["OhDear", "monitoring", RegExp], readonly ["Google-Safety", "monitoring", RegExp], readonly ["Cookiebot", "monitoring", RegExp], readonly ["OneTrust", "monitoring", RegExp], readonly ["CookieHub", "monitoring", RegExp], readonly ["Detectify", "monitoring", RegExp], readonly ["CensysInspect", "monitoring", RegExp], readonly ["BitSightBot", "monitoring", RegExp], readonly ["zgrab", "monitoring", RegExp], readonly ["Nmap", "monitoring", RegExp], readonly ["Stripe", "monitoring", RegExp], readonly ["HeadlessChrome", "headless_browser", RegExp], readonly ["PhantomJS", "headless_browser", RegExp], readonly ["SlimerJS", "headless_browser", RegExp], readonly ["Playwright", "headless_browser", RegExp], readonly ["Puppeteer", "headless_browser", RegExp], readonly ["Selenium", "headless_browser", RegExp], readonly ["Cypress", "headless_browser", RegExp], readonly ["Lightpanda", "headless_browser", RegExp], readonly ["wkhtmltopdf", "headless_browser", RegExp], readonly ["curl", "http_client", RegExp], readonly ["Wget", "http_client", RegExp], readonly ["python-requests", "http_client", RegExp], readonly ["python-urllib", "http_client", RegExp], readonly ["aiohttp", "http_client", RegExp], readonly ["httpx", "http_client", RegExp], readonly ["Scrapy", "http_client", RegExp], readonly ["Go-http-client", "http_client", RegExp], readonly ["okhttp", "http_client", RegExp], readonly ["Java", "http_client", RegExp], readonly ["axios", "http_client", RegExp], readonly ["node-fetch", "http_client", RegExp], readonly ["undici", "http_client", RegExp], readonly ["PostmanRuntime", "http_client", RegExp], readonly ["insomnia", "http_client", RegExp], readonly ["libwww-perl", "http_client", RegExp], readonly ["Guzzle", "http_client", RegExp], readonly ["Google-Apps-Script", "http_client", RegExp], readonly ["GoogleDocs", "http_client", RegExp]];
|
|
65
65
|
/**
|
|
66
66
|
* A name for a bot that is not in the named table, from the first of: a token that sounds like
|
|
67
67
|
* one (`Bytespider`, `ABEvalBot`), the name after `compatible;` (`Google-Read-Aloud`), a product
|
|
@@ -80,7 +80,8 @@ export declare function nameOfUnknownBot(userAgent: string, matched: string): st
|
|
|
80
80
|
*
|
|
81
81
|
* In order: a bot we can name; a browser driven by WebDriver (`tags.webdriver`, which the SDK
|
|
82
82
|
* sets from `navigator.webdriver`, the one sign a scripted browser with a normal user agent
|
|
83
|
-
* gives); anything the generic pattern calls automated; no
|
|
83
|
+
* gives); a person in a Meta app (`META_APP`); anything the generic pattern calls automated; no
|
|
84
|
+
* user agent at all.
|
|
84
85
|
*/
|
|
85
86
|
export declare function botOf(tags: TrackTags): Bot;
|
|
86
87
|
//#endregion
|