Skip to Content

Googlebot does not process sendBeacon requests

Published on

We were implementing bot detection for our internal tracking system and noticed that we receive events from bots like AhrefsBot, but not Googlebot. The weird thing was that we did receive events in Segment(opens in new tab), even though we were sending them both simultaneously.

The main difference was that the Segment SDK uses fetch()(opens in new tab) internally, while our code was using sendBeacon()(opens in new tab) which is supposedly better for handling analytics requests because:

  • It's non-blocking, so it doesn't have performance implications
  • It's fulfilled even after the browser tab is closed

However, since Google's job is to crawl the site and not necessarily browse it like a regular user, it likely ignoring sendBeacon() requests intentionally, to save resources.

Here's how our Cloudflare looked after switching from sendBeacon() to fetch():

Googlebot requests in Cloudflare

So if you want Googlebot to process requests you're sending, for whatever reason, do not use sendBeacon().