A practical guide to bot-proofing your ad bidding

Written by

Luc Nugteren

Published Jul 30, 2026 comments

Why bot traffic breaks bid optimization

System overview: what we're building

  1. 1.
  2. 2.
  3. 3.
  4. 4.

Step-by-step configuration

1. Measure first: run bot detection in reporting mode

The Bot Detection power-up in reporting mode. Every request gets labelled, nothing is blocked yet.
The Request Header variable in sGTM, reading the bot score off every incoming request.
Registering bot_score as an event-scoped custom dimension. Without this step the parameter arrives but stays invisible in reporting.

2. Filter per tag inside sGTM

Trigger name: Event - Purchase - X-Device-Bot-Score >75 Trigger type: Custom Event Event name: purchase Condition: Header - X-Device-Bot-Score greater than 75
The exception on a Google Ads conversion tag. It fires on purchase, except when the bot score is above 75.

3. Block at Stape, before sGTM

  1. 1.
  2. 2.
The same power-up switched to blocking. Requests scoring above 75 are rejected before they reach sGTM.

Important:

4. Filter on screen resolution

Screen resolution in GA4. The 0x0 row averages 2 seconds of engagement where most resolutions show two to three minutes, and it still registered 31 key events.

5. Block datacenter traffic at the edge

Rule name: Challenge datacenter traffic Action: Managed Challenge Expression: (ip.geoip.asnum in {16509 14618 8075 14061 24940 16276 20473 63949 45102 132203}) and not cf.client.bot
  1. 1.
  2. 2.

6. Protect your forms

<div> <label>Company website <input type="text" name="website" tabindex="-1" autocomplete="off"> </label> </div> <input type="hidden" name="rendered_at" value="1721556000">
const elapsed = Date.now() / 1000 - Number(body.rendered_at); if (body.website) return reject('honeypot filled'); if (elapsed < 3) return reject('submitted too fast');

7. Keep bots out of your offline conversions

WHERE gclid IS NOT NULL AND lead_status NOT IN ('spam', 'disqualified', 'unqualified') AND stage_reached >= 'contacted'

8. Clean up GA4 last

Caveats

Validation and testing

Conclusion

Want to try the server side?

Try for free

Written by

Luc Nugteren

Content writer

Luc is a tracking specialist focused on server-side tagging and data accuracy, helping ecommerce brands and agencies build scalable measurement systems that improve attribution and performance.

Was this article helpful?

Comments

Recommended for you

Solutions

Bot detection

Bot detection power-up checks if each Incoming Request inside the server Google Tag Manager is from a bot or not.

Jul 30, 2026

Turn better tracking into better marketing performance

Try for free