ipasis
Blog/Ad Fraud Prevention

How to Detect Click Fraud with IP Intelligence

March 11, 202610 min read

Click fraud costs advertisers an estimated $100 billion annually. Whether you're running Google Ads, Meta campaigns, or programmatic display, a significant percentage of your clicks may come from bots, click farms, or competitors deliberately draining your budget.

The good news: most click fraud is detectable using IP intelligence. By analyzing the source IP of every click before it counts toward your spend, you can filter out fraudulent traffic in real time.

💡

Key Insight

Over 70% of click fraud originates from datacenter IPs, VPNs, or known proxy networks—all detectable through IP intelligence analysis.

What Is Click Fraud?

Click fraud is the practice of generating illegitimate clicks on pay-per-click (PPC) ads. The goal varies by attacker:

  • Competitor fraud: Rivals click your ads to exhaust your daily budget
  • Publisher fraud: Publishers generate fake clicks on ads displayed on their sites to inflate revenue
  • Bot networks: Automated scripts mimicking human clicks at scale
  • Click farms: Low-wage workers clicking ads manually, often through VPNs
  • Ad stacking / pixel stuffing: Multiple ads layered invisibly, registering clicks the user never intended

Why Traditional Detection Falls Short

Ad platforms like Google Ads have built-in invalid click filters, but they catch only a fraction of fraud. Their detection is retroactive—they refund credits after the fact. By then, your budget is spent, your daily cap was hit early, and legitimate customers never saw your ads.

Traditional approaches also struggle with:

  • Residential proxies: Fraudsters route through real residential IPs, bypassing simple datacenter blocklists
  • Low-and-slow attacks: Spreading fraudulent clicks across time to avoid rate-based detection
  • Device spoofing: Bots that mimic real browser fingerprints and user agents

This is where real-time IP intelligence provides a critical advantage—it examines signals that fraudsters can't easily fake.

IP Signals That Expose Click Fraud

1. Datacenter Detection

Real humans don't browse from AWS, Google Cloud, or DigitalOcean. When a click originates from a datacenter IP, it's almost certainly automated.

IPASIS identifies datacenter hosting across 50+ cloud providers and returns this signal in every API response:

// Check if a click came from a datacenter
const response = await fetch('https://api.ipasis.com/v1/ip/check', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ ip: clickerIp })
});

const data = await response.json();

if (data.is_datacenter) {
  // Flag as suspicious — real users don't click ads from cloud servers
  markClickAsFraudulent(clickId, 'datacenter_ip');
}

2. VPN and Proxy Detection

Click farms almost universally use VPNs and proxies to disguise their true location. A click that claims to be from New York but routes through a VPN exit node in the same city as your competitor's office is a strong fraud signal.

Key proxy types to watch for:

  • Commercial VPNs: NordVPN, ExpressVPN, etc.—sometimes used by real users, but disproportionately by fraudsters
  • Residential proxies: The most sophisticated fraud vector. Detecting residential proxies requires analyzing behavioral patterns alongside IP data
  • SOCKS proxies: Low-cost, often part of botnets
  • Tor exit nodes: Tor traffic on ad clicks is almost always fraudulent

3. ASN and ISP Analysis

The ASN (Autonomous System Number) reveals who operates the network. Clicks from hosting ASNs (Hetzner, OVH, Linode) are suspicious. Clicks from consumer ISPs (Comcast, Vodafone, Jio) are more likely legitimate.

// Score click based on ASN type
function scoreClick(ipData) {
  let riskScore = 0;
  
  if (ipData.is_datacenter) riskScore += 40;
  if (ipData.is_vpn) riskScore += 25;
  if (ipData.is_proxy) riskScore += 30;
  if (ipData.is_tor) riskScore += 50;
  
  // ASN-level signals
  if (ipData.asn_type === 'hosting') riskScore += 35;
  if (ipData.asn_type === 'isp') riskScore -= 10; // Consumer ISP = lower risk
  
  // Geographic anomaly
  if (ipData.country !== expectedAdTargetCountry) riskScore += 15;
  
  return Math.min(riskScore, 100);
}

4. Geographic Consistency

If you're running ads targeting the United States but receiving clicks from IPs geolocated to countries you didn't target, that's a strong fraud signal. Even within your target geography, clustering of clicks from a single city or subnet is suspicious.

5. IP Risk Scoring

Rather than checking individual signals in isolation, a composite IP risk score aggregates all available intelligence into a single decision metric. IPASIS provides a 0-100 risk score combining datacenter detection, proxy analysis, abuse history, and network reputation.

Architecture: Real-Time Click Fraud Filter

Here's how to build a click fraud detection layer that runs in your ad tracking pipeline:

// Click fraud detection middleware
async function validateClick(req) {
  const clickerIp = req.headers['x-forwarded-for'] || req.ip;
  
  // Step 1: Check IP intelligence
  const ipData = await ipasis.check(clickerIp);
  
  // Step 2: Calculate fraud score
  const fraudScore = calculateFraudScore(ipData, req);
  
  // Step 3: Decision
  if (fraudScore >= 70) {
    // High confidence fraud — don't count the click
    logFraudulentClick(clickerIp, fraudScore, ipData);
    return { valid: false, reason: 'high_risk_ip' };
  }
  
  if (fraudScore >= 40) {
    // Medium risk — count but flag for review
    flagForReview(clickerIp, fraudScore, ipData);
    return { valid: true, flagged: true };
  }
  
  // Low risk — legitimate click
  return { valid: true, flagged: false };
}

function calculateFraudScore(ipData, req) {
  let score = 0;
  
  // IP-level signals
  if (ipData.is_datacenter) score += 40;
  if (ipData.is_vpn) score += 20;
  if (ipData.is_proxy) score += 30;
  if (ipData.is_tor) score += 50;
  if (ipData.risk_score > 70) score += 25;
  
  // Behavioral signals
  const clicksFromIp = getRecentClickCount(ipData.ip, '1h');
  if (clicksFromIp > 5) score += 20;
  if (clicksFromIp > 20) score += 30;
  
  // Geographic mismatch
  if (!isTargetedGeo(ipData.country)) score += 15;
  
  return Math.min(score, 100);
}

Combining IP Intelligence with Behavioral Signals

IP intelligence alone catches 70%+ of click fraud, but combining it with behavioral signals pushes detection accuracy above 95%:

SignalWhat It DetectsRisk Weight
Datacenter IPBot traffic from cloud infrastructureHigh
VPN/ProxyClick farms hiding real locationMedium-High
Tor exit nodeAnonymous trafficHigh
Click velocityMultiple clicks from same IP in short windowMedium-High
No mouse movementAutomated clicking without cursor activityMedium
Geo mismatchClick from country not targeted by campaignMedium
Zero time-on-siteClick that immediately bouncesMedium

Implementation Strategies by Platform

Google Ads

Google Ads doesn't allow pre-click filtering, but you can:

  1. Add a tracking template that routes clicks through your validation endpoint
  2. Check each click's IP against IPASIS before crediting the conversion
  3. Build an IP exclusion list from detected fraud and upload it to Google Ads (up to 500 IPs per campaign)
  4. Use automated rules to pause campaigns when fraud spikes

Meta / Facebook Ads

Meta's Conversions API lets you validate clicks server-side before reporting them as conversions:

  • Only send conversion events for clicks that pass IP validation
  • Use the action_source field to differentiate server-validated events
  • Monitor IP patterns across your click-to-lead pipeline

Programmatic Display

For programmatic campaigns, implement pre-bid filtering:

  • Check the bid request IP against your fraud intelligence before bidding
  • Maintain a real-time blocklist of high-risk IPs and subnets
  • Filter by ASN to exclude hosting and known bot network ASNs

Measuring Your Click Fraud Rate

Once you implement IP-based detection, track these metrics to quantify your fraud exposure:

  • Fraud rate: Percentage of total clicks flagged as fraudulent
  • Wasted spend: Fraud rate × total ad spend
  • Datacenter click %: Clicks from hosting providers (should be near 0% for consumer campaigns)
  • VPN/proxy click %: Baseline varies by industry (5-15% is normal, 30%+ indicates fraud)
  • Geographic anomaly rate: Clicks from non-targeted regions
📊

Industry Benchmark

Studies show that 14-20% of PPC clicks are fraudulent across industries. For competitive verticals like legal, insurance, and SaaS, fraud rates can exceed 30%.

Building an IP Exclusion Pipeline

One of the most effective tactics is automatically building and uploading IP exclusion lists to your ad platforms:

// Automated IP exclusion pipeline
async function buildExclusionList() {
  const fraudulentClicks = await db.query(`
    SELECT ip, COUNT(*) as click_count, 
           MAX(fraud_score) as max_score
    FROM click_events
    WHERE fraud_score >= 70
      AND timestamp > NOW() - INTERVAL '7 days'
    GROUP BY ip
    HAVING COUNT(*) >= 3
    ORDER BY click_count DESC
    LIMIT 500
  `);
  
  // Format for Google Ads IP exclusion
  const exclusionList = fraudulentClicks
    .map(row => row.ip)
    .join('\n');
  
  // Upload via Google Ads API
  await googleAds.uploadIpExclusions(campaignId, exclusionList);
  
  console.log(`Excluded ${fraudulentClicks.length} IPs from campaign`);
}

False Positives: Handling Legitimate VPN Users

Not every VPN click is fraud. Some legitimate users browse through VPNs for privacy. To minimize false positives:

  • Use risk scores, not binary signals: A VPN + datacenter + high click velocity = fraud. A VPN alone = maybe just a privacy-conscious user
  • Apply thresholds by campaign type: Brand awareness campaigns can tolerate more VPN traffic; direct response campaigns should be stricter
  • Track post-click behavior: If a VPN user clicks and then spends 3 minutes on your site, they're likely real
  • Whitelist known enterprise VPN ranges: Corporate VPNs from large companies are legitimate

Cost-Benefit: What IP Intelligence Saves You

For a company spending $10,000/month on PPC with a 20% fraud rate:

  • Monthly fraud waste: $2,000
  • Annual fraud waste: $24,000
  • Cost of IP intelligence API: ~$50-200/month (depending on volume)
  • Net savings: $21,600-23,400/year

That's a 100-400x ROI on fraud detection. And this doesn't account for the improved campaign performance from cleaner data and better bid optimization.

Getting Started with IPASIS

IPASIS provides the IP intelligence layer you need to detect click fraud in real time:

  • Sub-20ms response times: Fast enough for real-time click validation
  • Datacenter, VPN, proxy, and Tor detection: All major fraud vectors covered
  • ASN and ISP identification: Know exactly what network the click came from
  • Risk scoring: Aggregate risk score to simplify your decision logic
  • Simple REST API: Integrate in minutes with any ad tracking stack

Stop paying for bot clicks. Start your free trial →


Related Reading