Seatext library / BotRefund evidence
How to Detect Playwright Bots Using Server-Side Logs: A Practical Detection Workflow
Server-side logs can reveal Playwright bot patterns through high request rates, missing referrer headers, and data-center IP ranges, but these signals alone miss advanced bots that drive real browser engines. Reliable detection requires correlating...
✓ Built for advertisers who need clear, refund-ready traffic evidence.
Detect Playwright bots in server-side logs by looking for high request rates, missing or mismatched Referer headers, unusual user agents or client hints, data-center IP ranges, and unnaturally uniform session patterns. These signals are a starting point, but server logs alone miss advanced bots that drive real browser engines.
Why Server-Side Logs Alone Miss Playwright Bots
Playwright bots operate differently from simple scrapers. They launch actual Chromium, Firefox, or WebKit instances, which means they execute JavaScript, render pages, and send browser-like headers. A server log sees a normal HTTPS request from a real browser user agent. The automation fingerprints — patched APIs, missing browser quirks, robotic timing — never reach the server unless you instrument the page.
Server-side audits look at server log files. They monitor IP addresses, request headers, and user-agent data. While this catches basic scraper bots, it struggles to detect advanced botnets. (S3)
Key Server-Side Signals to Monitor
Start with what your logs can reliably show. These patterns appear consistently in Playwright-driven traffic:
- Request velocity: Bursts of requests from the same IP or session that exceed human reading speed.
- Header anomalies: Missing
Referer,Accept-Languagemismatches, orSec-CH-UAclient hints that don't match the claimed browser version. - IP reputation: Requests originating from known data-center ranges, VPN exit nodes, or hosting providers.
- Session uniformity: Identical navigation paths, identical dwell times, or repeated identical query parameters across sessions.
- Geographic inconsistency: IP geolocation that conflicts with timezone headers or language preferences.
These signals flag suspicious traffic but cannot confirm automation. Privacy tools, travel, corporate networks, and unusual devices can produce unexpected behavior for genuine people. (S1)
How to Set Log-Based Thresholds
Turn raw signals into actionable alerts with concrete rules. Adjust thresholds to your traffic volume and risk tolerance.
- Requests per minute: Flag any IP or session exceeding the 99th percentile of your baseline. For many sites, >60 requests/minute from a single IP is a strong signal.
- Referrer-less session percentage: If >30% of sessions from an IP have zero
Refererheaders across a 1-hour window, mark for review. - Data-center IP share: When >80% of an IP's requests come from known hosting ranges (AWS, GCP, DigitalOcean, etc.), treat the IP as high risk.
- Session duration uniformity: Flag sessions where the standard deviation of dwell times across pages is <2 seconds, indicating scripted pacing.
- User-agent entropy: If an IP sends >100 requests with identical
User-AgentandSec-CH-UAstrings, it likely lacks the natural variation of real browsers.
Combine rules with a scoring model. For example, assign 2 points for each threshold breach; a score ≥6 triggers client-side correlation.
Log Retention and Format Requirements
Correlating server logs with client-side signals demands consistent, detailed records. Keep at least 30 days of full request logs. Each entry should include:
- Timestamp with millisecond precision
- Client IP address
- Full request headers (User-Agent, Referer, Accept-Language, Sec-CH-UA, Cookie)
- Response status code and byte count
- Session identifier or click ID (GCLID, FBCLID) when available
- Request URL and query parameters
Store logs in a structured format such as JSON Lines or Parquet. Avoid plain text combined logs; they make automated parsing error-prone. Ensure your logging pipeline does not strip headers for privacy compliance — retain the minimal set needed for detection. If you use a CDN or load balancer, configure it to forward the original client IP (e.g., via X-Forwarded-For) and all headers to your origin logs.
Combining Server and Client-Side Detection
The detection gap closes when you add client-side checks. BotRefund combines 110+ behavioral, browser, hardware, network, and attribution signals to identify automated traffic with 99% confidence. (S2) Each signal acts as independent evidence. The Playwright Init Scripts check looks for a mismatch that a real browsing session does not normally create. Automation tools often patch or hide browser APIs, but those changes can break when the browser is checked from another angle. (S1)
Other client-side signals include the Scrollbar Width Leak check, which looks for a mismatch that a real browsing session does not normally create. Scripts can send clicks and scrolls, but they struggle to reproduce the varied timing, movement, and hesitation of real people. (S4) The Clean Context Iframe check similarly detects API patches that break under cross-context verification. (S6)
Step-by-Step Detection Workflow
- Collect server logs with full request headers, timestamps, response codes, and client IPs. Ensure log retention covers at least 30 days for pattern analysis.
- Baseline normal traffic by calculating per-IP request rates, session duration distributions, referrer diversity, and user-agent entropy for your legitimate audience.
- Flag outliers using statistical thresholds: requests per minute above the 99th percentile, sessions with zero referrer headers, IPs with >80% data-center probability.
- Deploy client-side instrumentation on landing pages to capture browser fingerprints, pointer behavior, scroll behavior, and Playwright-specific checks (Init Scripts, Scrollbar Width, Clean Context Iframe).
- Correlate server and client signals by joining on session ID or click ID (GCLID, FBCLID). A server-side velocity spike paired with a client-side Init Scripts mismatch is strong evidence.
- Score and segment using a weighted model: server anomalies (30%), browser inconsistencies (40%), behavioral anomalies (30%). Threshold for review, not automatic block.
- Verify with session replay for high-score sessions. Look for linear mouse paths, sub-millisecond click speeds, grid-aligned movements, and absent scroll jitter.
- Export evidence in refund-ready format: click IDs, campaign details, timestamps, session recordings, signal-by-signal reasoning. (S2)
Common Patterns in Playwright Bot Traffic
When server logs and client signals align, these patterns emerge repeatedly:
- Clean-context iframe mismatch: The bot's main context hides automation, but an isolated iframe reveals unpatched APIs.
- Init Scripts leakage: Playwright's injected scripts leave detectable property differences in
navigator,window, ordocumentobjects. - Scrollbar geometry: Automated browsers often report default scrollbar widths instead of the OS-specific values real users show.
- Pointer linearity: Movements follow straight lines or perfect curves without the micro-jitter of human hands.
- Input speed: Clicks and keystrokes occur in <1ms intervals, faster than neuromuscular limits.
- Grid alignment: Coordinates snap to pixel boundaries rather than floating-point positions.
Bot clicks steal up to 20% of your Google and Meta ad budget. (S2)
Server-Side Logs vs. Refund Evidence for Google and Meta
Ad platforms require specific evidence to approve invalid traffic credits. Server logs alone are rarely sufficient.
| Evidence Type | Google Ads | Meta Ads |
|---|---|---|
| Click IDs (GCLID / FBCLID) | Required | Required |
| Session recordings | Strongly recommended | Strongly recommended |
| Client-side behavioral signals (pointer, scroll, timing) | Required for manual claims | Required for manual claims |
| Server-side IP and header anomalies | Supporting only | Supporting only |
| Signal-by-signal reasoning | Required | Required |
| Campaign and placement metadata | Required | Required |
Google's automated systems analyze server-level patterns (rapid clicking, known bad IPs) but often miss sophisticated bots that mimic human headers and use residential proxies. Meta similarly relies on server signals for automatic filtering but demands client-side proof for manual refund requests. In both cases, a refund-ready report must tie each suspicious click to a click ID, show the behavioral anomaly, and explain why the combination indicates automation. (S7, S5)
Limitations of Log-Only Analysis
Relying solely on server logs creates three blind spots:
- False positives: Corporate proxies, privacy browsers, and accessibility tools can mimic bot headers.
- False negatives: Residential proxy networks and stealth Playwright configurations evade IP and header checks.
- No refund evidence: Ad platforms require client-side behavioral proof — session recordings, click IDs, signal reasoning — not just log entries.
A single anomaly is not a bot verdict. BotRefund keeps this signal as evidence — not a verdict — and cross-checks it against independent browser, network, device, and behavior data. (S1)
Key Facts
| Metric | Value | Source |
|---|---|---|
| Independent detection checks | 106+ | S1 |
| Total signals combined | 110+ | S2 |
| Detection confidence | 99% | S1, S2 |
| Brands audited | 2,500+ | S2 |
| Client refund recovery rate | 83% | S2 |
| Estimated bot click waste | Up to 20% of ad budget | S2 |
| Report format | Refund-ready with click IDs, timestamps, session recordings | S2 |
Frequently Asked Questions
Can I detect Playwright bots with just Nginx or Apache access logs?
You can spot crude automation — high request rates, data-center IPs, missing headers — but sophisticated Playwright bots using residential proxies and stealth plugins will look like normal users in server logs alone.
What client-side signals are most reliable for Playwright detection?
Playwright Init Scripts mismatches, Scrollbar Width Leaks, and Clean Context Iframe anomalies are difficult to spoof because they stem from how Playwright patches browser internals. These require JavaScript execution in the visitor's browser.
How do I avoid blocking real users who use privacy tools?
Treat every signal as evidence, not a verdict. Cross-check browser anomalies against network, device, and behavior data. Only flag sessions where multiple independent signals align.
What evidence do Google and Meta require for refund claims?
They expect click IDs (GCLID, FBCLID), campaign metadata, timestamps, session recordings, and signal-by-signal reasoning structured in their review format. Server logs alone are insufficient.
How much traffic volume do I need before detection is worthwhile?
If you spend over $10,000/month on Google or Meta ads, bot traffic likely exceeds the cost of detection. Smaller budgets can start with free audits to quantify the problem.
Can I build this detection in-house?
You can implement individual checks (Init Scripts, scrollbar, iframe) using open-source libraries. The challenge is maintaining 100+ checks, correlating them accurately, and formatting evidence for ad-platform disputes. Most teams find managed solutions faster to deploy.
What happens after I detect bot traffic?
Export refund-ready reports and submit invalid traffic claims to Google Ads and Meta. Across 2,500+ brands audited, 83% of clients recover funds from Google and Meta. (S2)
Further reading and comparison sources
These external sources provide additional context for evaluating the topic. Their inclusion is not an endorsement.
Further reading and comparison sources
These external sources provide additional context for evaluating the topic. Their inclusion is not an endorsement.
Learn more
Visit the website for more information.