Have you ever run ads but couldn’t confirm whether they actually appeared in your target regions? For example, launching a product in the U.S. or running promotions in Southeast Asia—yet having no visibility into what users actually see.
In multi-region campaigns, ad platforms dynamically display content based on user IPs. Relying solely on backend data makes it difficult to verify real performance, often leading to wasted budget. By using proxy, you can simulate access from different regions and directly check whether your ads are truly being displayed.
Next, we’ll walk through how to use Python with proxy to automate AD verification.
I. What Is AD Verification?
AD verification refers to the process of simulating real user environments to monitor the entire ad journey—from impression to conversion—ensuring that ads are functioning as intended.
Key verification points include:
● Whether ads are actually reaching users in the target region
● Whether ads are properly displayed (visible to users)
● Whether the click-through path is complete (landing page loads correctly)
If you rely only on platform data without verification, you may face:
● Incorrect ROI calculations
● Wasted ad budget
● Misjudgment of ad creative performance
Common AD verification methods comparison:
MethodProsConsManual testingEasy to operate, quick to startUnstable / not scalablePlatform dataOfficial and easy to accessMay have delays or inaccuraciesPython + proxyAutomated / close to real user environmentRequires technical knowledge
II. AD Verification: Tool Preparation
Before starting AD verification, you need a clear execution strategy: simulate users from different countries or regions accessing ad pages to determine whether ads are properly displayed and aligned with campaign plans.
You should also define the workflow, including switching network environments across regions, comparing ad display results, and recording loading status and response data.
In terms of tools, prepare a basic environment such as Python, along with libraries like requests or parsing tools to fetch and analyze page content. Most importantly, choose stable proxy with accurate geo-targeting to replicate real user access and ensure reliable results.
III. How to Use Python for AD Verification Crawling
In real ad campaigns, you can build an automated AD verification system using Python. The core idea is to simulate users from different regions via proxy and collect and analyze the results.
1.Configure rotating proxy
The first step is not writing a crawler, but solving the “where to access from” problem. Using a local IP cannot validate ad delivery in other regions, nor support large-scale regional testing.
Common alternatives like public nodes often have poor quality, contaminated IPs, and lack scalability. In this case, rotating residential proxy is a better choice.
High-quality rotating residential proxy offers:
● Clean IPs without shared “bad history”
● Distributed request load to avoid detection from frequent access
● More natural browsing behavior, reducing risk of detection
Below is an example of configuring a global proxy using Python:
Using IPFoxy’s rotating proxy panel, you can extract parameters such as protocol, region, session interval, and format, then generate proxy credentials for Python. For example, if the proxy is:
username:password@gate-us-ipfoxy.io:58688
You can configure it as follows:
import urllib.request
if __name__ == '__main__':
proxy = urllib.request.ProxyHandler({
'https': 'username:password@gate-us-ipfoxy.io:58688',
'http': 'username:password@gate-us-ipfoxy.io:58688',
})
opener = urllib.request.build_opener(proxy, urllib.request.HTTPHandler)
urllib.request.install_opener(opener)
content = urllib.request.urlopen('http://www.ip-api.com/json').read()
print(content)
2.Ad page detection logic
After configuring proxy, access the ad page and check whether the content meets campaign requirements. Focus on whether ad elements exist, whether promotional content is displayed, and whether results vary across regions.
For further automation, you can use BeautifulSoup or Playwright in Python to parse HTML and extract key elements.
3.AD verification using Selenium
For search ads or scenarios requiring page rendering, Selenium can be used to verify whether ads are actually visible.
from selenium import webdriver
from selenium.webdriver.common.by import By
def verify_ad_display(url, proxy):
options = webdriver.ChromeOptions()
options.add_argument(f"--proxy-server={proxy}")
options.add_argument("--disable-blink-features=AutomationControlled")
driver = webdriver.Chrome(options=options)
driver.get(url)
elements = driver.find_elements(By.CSS_SELECTOR, "div[data-text-ad]")
is_visible = len(elements) > 0
driver.quit()
return is_visible
4.High-fidelity AD verification with Playwright
When ad pages rely heavily on JavaScript or include anti-bot mechanisms, Playwright provides more realistic simulation. It is more stable and less likely to be detected, making it suitable for complex ad scenarios like TikTok.
from playwright.sync_api import sync_playwright
import random
def run_check(url, proxy):
with sync_playwright() as p:
browser = p.chromium.launch(proxy={"server": proxy})
context = browser.new_context(
locale="en-US"
)
page = context.new_page()
page.goto(url, timeout=60000)
page.wait_for_timeout(2000 + random.randint(1000, 3000))
content = page.content()
browser.close()
return content
5.Batch AD verification across multiple regions
Once a single workflow is validated, you can scale it to multi-region batch testing:
proxy_list = [
"http://user:pass@us.gateway:port",
"http://user:pass@uk.gateway:port",
"http://user:pass@sg.gateway:port"
]
results = []
for proxy in proxy_list:
visible = verify_ad_display("https://example.com", proxy)
results.append({
"region": proxy,
"visible": visible
})
print(results)
6.Organizing and exporting AD verification data
Finally, structure the results for analysis and optimization. Output data can help determine:
● Whether ads are delivered properly across regions
● Whether content is consistent
● Whether anomalies or missing displays exist
import csv
def export_report(data):
with open("ad_report.csv", "w", newline="", encoding="utf-8") as f:
writer = csv.DictWriter(f, fieldnames=["region", "visible"])
writer.writeheader()
writer.writerows(data)
export_report(results)
With this workflow, you can build a complete AD verification system—from proxy integration and page access to result analysis. Compared to manual testing, this approach enables automated multi-region validation, significantly improving accuracy and efficiency.
IV. FAQ
Proxy frequently fails or gets blocked, preventing ad access?
Use high-quality rotating residential proxy and adopt proper IP strategies. For example, IPFoxy offers three modes: sticky sessions (maintain the same IP for a period, suitable for continuous access), per-request rotation (automatically switch IPs for large-scale monitoring), and manual switching via API. Regularly check IP availability to avoid invalid nodes.
Slow page loading or incomplete ad elements?
Many ad pages rely on JavaScript rendering, so direct requests may not return full content. Use Selenium or Playwright to simulate real browsers, and add wait times or explicit waits to ensure elements fully load before extraction. Avoid frequent refreshes that may trigger detection.
Discrepancies between monitoring results and platform data?
Ad platforms use algorithmic delivery and A/B testing, so different users may see different content. Combine proxy-based monitoring with platform data, and perform multiple checks across different times and IPs to reduce randomness and improve accuracy.
V. Summary
With the workflow outlined in this guide, you can build a complete AD verification system—from proxy integration and page validation to structured data output. Compared to manual testing, this method is more stable and enables scalable multi-region monitoring.
If you are running ads on TikTok or other platforms, it’s recommended to adopt automated verification as a core capability. This helps continuously optimize your strategy, avoid wasted spend, and ensure every dollar of your budget is controlled and efficient.



Top comments (0)