The bot module
Part of the SharedID Edge specification. The general rules for modules, including consent, time limits and modules on /sync, are there.
Name bot; no purposes, no gvlid. It runs only when listed in SID_MODULES, on v1 and sync (its routes), and reports to the traffic signal (status ok when it reports something, else empty). It doesn't repeat the platform's verdict, which is merged on its own, and doesn't recognize crawlers by user agent.
Settings,
SID_MODULE_CONFIG.bot, both optional:missingHeaders(boolean, defaultfalse): reportbot: true, botKind: likelywhen the user agent claims to be a browser (it starts withMozilla/5.0 () and the request lacks headers browsers send:- an
Accept-Languageheader that's missing or empty; or - all of
Sec-Fetch-Site,Sec-Fetch-ModeandSec-Fetch-Dest, when the request URL is https (or the host islocalhost,127.0.0.1or[::1]) and the user agent is a version that sends them:Chrome/80 or later; elseFirefox/90 or later, but notFxiOS/; elseVersion/17 or later followed bySafari/, but not withCriOS,FxiOS,EdgiOSorAndroid.
- an
internalCookie(a cookie name): reportinternal: truewhen the request carries that cookie with a non-empty value.
Any other key, or a wrong type, makes the module an
error.Secret,
SID_MODULE_SECRETS.bot.internalToken(optional, at least 16 characters): the internal cookie then counts only when its value is the token. Any other key, or a shorter token, makes the module anerror.Consent: as for every traffic report, it runs and reports whatever the consent signals say.
On
/sync, its report counts towards Skipping bots, so a likely bot gets no ID from Prebid.js'spixelUrlcall whenSID_SKIP_BOTSwould deny it one on/v1.It MUST NOT store or log anything about the request.