WORKFLOW SNAPSHOT
- Check whether an expected placement appears on approved pages under specified regional conditions.
- Suggested starting behavior: Timed session
- Validate the real application and destination
A practical Ad verification workflow
Check whether an expected placement appears on approved pages under specified regional conditions.
- Record page URL, viewport, locale, and consent state.
- Capture the placement and landing hostname without clicking repeatedly.
- Separate missing, delayed, and blocked ad responses.
Why keep an ad placement and its landing journey in one session?
Keep one assignment during the permitted placement observation and any allowed landing-page journey. Start a separate context for another regional scenario. A timed window should cover the whole observation rather than expire between the placement and its destination.
Which campaign, placement and regional fields must pass before scale?
An exit country is only one targeting signal. Repeated clicks or fabricated conversions would contaminate the test and can harm publishers or advertisers.
Preserve timestamps and redacted screenshots for genuine presentation issues, and coordinate testing with the campaign owner.
Verify the Ad verification connection boundary
Record campaign or creative identifier, placement, requested region, viewport, consent and observation time. A missing impression is not automatically fraud; schedule, targeting, frequency and available inventory can affect what is shown.
Check an approved placement's server-delivered markup
Fetches the approved page document and checks for an expected placement marker in the markup returned by the server.
- 01Generate your endpoint
Choose HTTP / HTTPS and Sticky session for the complete workflow in Configure proxies.
- 02Set your proxy URL
Set
PS_PROXY_URLtohttp://USERNAME:PASSWORD@HOST:PORTusing your generated endpoint. For IP authentication, whitelist your machine and usehttp://HOST:PORT. Percent-encode special characters in credentials; these are proxy credentials, separate from your account password or API key. - 03Choose the destination
Set
Example URL · replace placeholders with your targetPS_TARGET_URLbefore running the code. Use an approved publisher page or ad-test fixture with a known placement identifier and documented visitor region; use the page URL rather than an impression or click-tracking URL.https://example.com/qa/approved-ad-placement.htmlSet PS_EXPECT_TEXT to the approved placement or campaign fixture identifier expected in the source. This optional check inspects the returned text without running JavaScript.
Python 3.10+ · python -m pip install requests · python ps_ad_verification.py# Fetches the approved page document and checks for an expected placement marker in the markup returned by the server.
# Use an approved publisher page or ad-test fixture with a known placement identifier and documented visitor region; use the page URL rather than an impression or click-tracking URL.
import hashlib
import json
import os
import time
from pathlib import Path
from urllib.parse import urlsplit
import requests
class InspectSession(requests.Session):
# Leave redirect bodies streamed instead of preparing the next request.
def resolve_redirects(self, *args, **kwargs):
return iter(())
proxy = os.environ["PS_PROXY_URL"] # HTTP endpoint from ProxySight
target = os.environ["PS_TARGET_URL"] # https://example.com/qa/approved-ad-placement.html
if urlsplit(proxy).scheme != "http":
raise ValueError("Use your generated HTTP proxy endpoint for this example.")
if urlsplit(target).scheme not in ("http", "https"):
raise ValueError("PS_TARGET_URL must be an HTTP or HTTPS URL.")
with InspectSession() as client:
client.trust_env = False # No ambient proxy, NO_PROXY or netrc overrides
started = time.monotonic()
with client.get(
target,
proxies={"http": proxy, "https": proxy},
headers={"Accept-Language": "en-US,en;q=0.9"},
timeout=(10, 20), allow_redirects=False, stream=True,
) as response:
body = bytearray()
for chunk in response.iter_content(16384):
body.extend(chunk)
if len(body) > 1048576:
raise RuntimeError("Response exceeds this example's 1 MiB limit.")
Path("approved-placement-source.html").write_bytes(body)
print(json.dumps({
"workflow": "ad-verification", "status": response.status_code,
"elapsed_ms": round((time.monotonic() - started) * 1000),
"bytes": len(body), "sha256": hashlib.sha256(body).hexdigest(),
"headers": {name: response.headers.get(name) for name in ['Content-Type', 'Content-Language', 'Location']},
}, indent=2))
expected = os.getenv("PS_EXPECT_TEXT", "")
if expected:
text = body.decode(response.encoding or "utf-8", errors="replace")
print("Expected text:", "found" if expected in text else "absent")
# A 200 status alone does not prove the intended page was returned.
# Inspect redirects, login prompts, 403 and 429 before another request.
Inspect status, cache context and the placement identifier before comparing source observations across visitor scenarios. This GET does not render or view an ad, verify a creative, run an auction or click a campaign link; use the approved browser QA flow for those presentation checks.
Response bodies are limited to 1 MiB for a small diagnostic. TLS verification stays enabled; redirects are left for you to inspect. Connection guide
Example: observe an approved placement without fabricating engagement
Agree the page sample, campaign scope, visitor scenario, and evidence format with the campaign owner. Record whether the expected placement appears and where its visible link points, without generating repeated clicks or false conversions.
Consent state, viewport, time, and targeting context can affect presentation. Preserve them with the screenshot so a missing placement can be investigated meaningfully.
{
"page": "APPROVED_PUBLISHER_PAGE",
"placement": "EXPECTED_SLOT",
"consent_state": "RECORD_STATE",
"creative_result": "RECORD_RESULT",
"clicks_generated": 0
}Ad verification verification checklist
For this Ad verification workflow, record campaign scope, visitor context and evidence alongside the actual result. Use the evidence below to decide whether another observation is comparable before increasing the workload.
| Checkpoint | Hold constant or record | Expected evidence |
|---|---|---|
| Campaign scope | Approved page and placement | Authorized observation |
| Visitor context | Consent, viewport, locale, time | Reproducible presentation |
| Evidence | Placement and landing hostname | Observation without artificial engagement |
Troubleshoot Ad verification results and connection errors
| Symptom | Check next | What the result tells you |
|---|---|---|
| Placement absent | Compare consent and load timing | Not automatically a route problem |
| Unexpected creative | Check campaign context | Several targeting signals apply |
| Click count rises during QA | Review test method | Observation should not fabricate engagement |
Build comparable ad-verification evidence for an approved placement
Use a small approved placement list with expected fields and a defined observation window. Save the visible result and final landing URL without generating unnecessary repeated interactions. Compare like-for-like visitor contexts and escalate discrepancies with their full observation context.
A LITTLE CLARITY
Common questions.
Can ad verification include fake clicks?
No. Verification should observe approved placements without fabricating engagement.
What should an ad-verification fixture avoid?
Artificial clicks, conversions, or repeated interactions that contaminate campaign measurements.
Which campaign, placement and regional fields must pass before scale?
Record campaign or creative identifier, placement, requested region, viewport, consent and observation time. A missing impression is not automatically fraud; schedule, targeting, frequency and available inventory can affect what is shown.