Proxies for Ad Verification
Ad verification ensures your ads appear on the right sites, in the right locations, and are seen by real users. Hex Proxies provides access to a 10M+ residential IP network through partner agreements, letting you verify ad placements from any geography, detect fraud, and monitor competitor campaigns.
Why Proxies for Ad Verification
- Geographic accuracy: Ads are targeted by location — you need local IPs to see what local users see.
- Fraud detection: Identify click fraud, domain spoofing, and malvertising by viewing ads as real users.
- Brand safety: Verify your ads do not appear alongside harmful or off-brand content.
- Competitor intelligence: See which ads competitors run in different markets.
Ad Verification Workflow
import requests
from datetime import datetime
class AdVerifier:
def __init__(self, proxy_user, proxy_pass):
self.proxy_user = proxy_user
self.proxy_pass = proxy_pass
self.gateway = "gate.hexproxies.com:8080"
def verify_ad(self, publisher_url, expected_ad_domain, country="us"):
proxy = f"http://{self.proxy_user}-country-{country}:{self.proxy_pass}@{self.gateway}"
proxies = {"http": proxy, "https": proxy}
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"Accept": "text/html,application/xhtml+xml",
"Accept-Language": "en-US,en;q=0.9",
}
resp = requests.get(publisher_url, proxies=proxies, headers=headers, timeout=30)
ad_present = expected_ad_domain in resp.text
return {
"publisher": publisher_url,
"country": country,
"ad_found": ad_present,
"response_code": resp.status_code,
"timestamp": datetime.utcnow().isoformat(),
"page_size": len(resp.content),
}
def verify_across_regions(self, publisher_url, expected_ad_domain, countries):
results = []
for country in countries:
result = self.verify_ad(publisher_url, expected_ad_domain, country)
results.append(result)
return results
# Verify ad placement across 5 countries
verifier = AdVerifier("YOUR_USERNAME", "YOUR_PASSWORD")
results = verifier.verify_across_regions(
"https://publisher-example.com/article",
"your-ad-network.com",
["us", "gb", "de", "fr", "jp"]
)
for r in results:
status = "FOUND" if r["ad_found"] else "MISSING"
print(f"{r['country']}: {status} (HTTP {r['response_code']})")Fraud Detection Patterns
def detect_domain_spoofing(verifier, claimed_domain, actual_url, countries):
"""Check if the actual publisher URL matches the claimed domain in ad reports."""
results = []
for country in countries:
proxy = f"http://{verifier.proxy_user}-country-{country}:{verifier.proxy_pass}@{verifier.gateway}"
resp = requests.get(actual_url, proxies={"http": proxy, "https": proxy}, timeout=20, allow_redirects=True)
final_domain = resp.url.split("/")[2]
is_spoofed = claimed_domain not in final_domain
results.append({
"country": country,
"claimed": claimed_domain,
"actual": final_domain,
"spoofed": is_spoofed,
})
return resultsMonitoring Schedule
| Check Type | Frequency | Priority |
|---|---|---|
| Brand safety scan | Every 4 hours | High |
| Placement verification | Every 2 hours | High |
| Competitor ad monitoring | Daily | Medium |
| Domain spoofing check | Every 6 hours | Critical |
| Creative compliance | Daily | Medium |
Browser-Based Verification
For JavaScript-rendered ads, use a headless browser with proxies:
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch({
args: ['--proxy-server=http://gate.hexproxies.com:8080'],
});
const page = await browser.newPage();
await page.authenticate({
username: 'YOUR_USERNAME-country-us',
password: 'YOUR_PASSWORD',
});
await page.goto('https://publisher-example.com/article', { waitUntil: 'networkidle2' });
// Capture all ad-related network requests
const adRequests = [];
page.on('request', (req) => {
if (req.url().includes('doubleclick') || req.url().includes('googlesyndication')) {
adRequests.push(req.url());
}
});
// Screenshot for visual verification
await page.screenshot({ path: 'ad-verification.png', fullPage: true });
await browser.close();Hex Proxies residential network ensures your verification requests appear indistinguishable from real user traffic, giving you accurate visibility into how ads actually render for end users.