Server-Side Edge Detection · BigQuery / Vertex AI · Value-Based Bidding · Channel Attribution
Cloud Armor · Edge Score
—
Math.random()
· refreshes every 4s
—
Raw GA4 hits scored server-side → ML clustering filters bots before BigQuery export
Raw Sessions
—
Cleaned
—
Bots Removed
—
Raw Sessions
rawSessions[day]
Loaded from pipeline output via summary.json.
Production: BigQuery events_* table ·
GA4 public dataset ↗
Cleaned Sessions
raw × (1 − bot_rate)
Vertex AI clustering removes bot sessions before export · Vertex AI ↗
Bots Removed %
(raw − cleaned) / raw × 100
Computed from totals across the 7-day window.
Algorithmic $0 bidding on detected bots — replacing manual audience exclusions
Total Clicks
0
count++ per event
Human
0
score ≥ 0.70
Bot / Fraud
0
score < 0.70
Ad Spend Saved
$0
bot_n × $2.40 CPC
Classification
≥ 0.70 → HUMAN
0.40–0.69 → SUSPICIOUS
< 0.40 → BOT
Conv. Value
HUMAN → $150.00
else → $0.00
$0 for bots = Smart Bidding deprioritises that traffic automatically.
Ad Spend Saved
bot_clicks × $2.40
$2.40 = simulated avg CPC.
Production: pulled from Google Ads API.
| Time | Client ID | Source | Edge Score | Type | Conv. Value |
|---|
↑ Live feed — new event every 2s · all values simulated client-side
Bot-contaminated signals overstate channel lift — calibration reveals true media performance
Channel Attribution — How the numbers are calculated
Raw Lift
GA4-reported conversion rate
(includes bot-triggered pixels)
From pipeline output via summary.json — loaded on page open.
Calibrated Lift
Raw Lift × (1 − bot_contamination_rate)
Pipeline output (numpy attribution model) · Production: feed cleaned export into Meridian (Bayesian MMM) ↗
Bot Inflation
(Raw − Calibrated) / Calibrated × 100
% by which bot traffic overstated the channel's true lift.
| Channel | Raw Lift | Calibrated | Bot Inflation | Interpretation |
|---|---|---|---|---|
| Google Ads | 37.2% | 35.7% | 48.3% | Moderate bot inflation — intent-based search audience has ~48% bot share in this dataset |
| Meta Ads | 28.5% | 29.3% | 44.5% | High bot contamination on broad paid social audiences — calibrate before budget planning |
| Bing Ads | 20.3% | 21.0% | 44.2% | Similar bot rate to Meta — smaller volume means lower absolute spend impact |
| Display | 14.0% | 14.0% | 45.9% | Lowest share channel — high bot rate typical for programmatic display inventory |
Pipeline output — numpy attribution model (raw vs. bot-cleaned sessions) · Install google-meridian ↗ for Bayesian MCMC in production · Media spend synthesized from ROAS assumptions [SYNTHETIC]
GA4 Measurement Protocol — Server-Side Event Stream
EDGE = header edge detection cycle (every 4s)
VBB = simulated paid click (every 2s)
MERIDIAN = toggle event
Score = Math.random() 0.0–1.0
Conv = score ≥ 0.70 ? $150 : $0
All payloads simulated — no GA4 MP endpoint called