Google Ads and Meta bid toward the people who convert. When bots fill in forms or trigger conversion events on your site, the platforms learn from those fake conversions and look for more traffic like them. This article shows how to use BotD, an open-source bot detection library, to keep bot conversions out of your bidding data.
Bot conversions teach the ad platforms to find more bots
Bots are automated programs that browse websites, click ads and even fill out forms, which makes them hard to tell apart from real visitors. When they reach your site, they cause three problems:
- Polluted bidding signals: a bot that triggers a lead or purchase event counts as a conversion, and the platform optimizes toward similar traffic.
- Wasted ad spend: you pay for bot clicks that will never become sales.
- Skewed reporting: bots inflate click-through rates and conversion counts, so campaigns look better or worse than they are.
Filtering on your site can’t stop a bot from clicking an ad; that happens before the visit. What it can do is stop bot visits from being reported as conversions.
BotD flags likely bots on each page view
BotD checks signals from the visitor’s browser (automation tools, headless browsers, inconsistent device data) and returns a result saying whether the visitor is likely a bot.
To add it, place this snippet in the <head> of your pages (or in a GTM Custom HTML tag that fires early):
<script>
var botdPromise = import('https://openfpcdn.io/botd/v1').then(function(Botd) {
return Botd.load();
});
botdPromise
.then(function(botd) {
return botd.detect();
})
.then(function(result) {
window.botDetectionResult = result;
console.log(result); // Log the bot detection result
})
.catch(function(error) {
console.error(error);
});
</script>
The script stores the result in window.botDetectionResult, where Google Tag Manager can read it.
A GTM trigger can fire conversion tags only for human visitors
- Create a JavaScript Variable in GTM called “BotD Result” that reads
botDetectionResult.bot. - Create a trigger that fires only when “BotD Result” equals
false, meaning BotD judged the visitor human. - Add that condition to your Meta and Google Ads conversion tags, such as Lead or Purchase.
Detection runs asynchronously, so test in GTM preview mode that the result exists before your conversion tags fire. If it might not be ready, fire the conversion on a later event rather than skipping it. BotD won’t catch every bot, but the conversions your ad platforms learn from will contain far fewer of them.
A few account settings reduce bot traffic further
- Review your traffic sources and placements regularly, and exclude sites or apps that send clicks with no engagement.
- In Google Ads, add IP addresses that keep sending invalid clicks to the campaign’s IP exclusion list.
- Add a hidden honeypot field or a CAPTCHA to lead forms so bot submissions never reach your CRM.
- Optimize your Meta and Google Ads campaigns toward qualified leads or sales rather than raw form fills, which bots can fake more easily.
