GeoTargetly + AffilFinder: Build a Geo Popup That Monetizes Blocked Visitors in 15 Minutes
If you publish in a regulated vertical — iGaming, fintech, streaming, regional SaaS — you almost certainly send some percentage of paid and organic traffic to a "Sorry, not available in your country" screen. That screen has near-zero monetization in most stacks. This tutorial walks through how to flip it into a paying surface in roughly fifteen minutes, using GeoTargetly for the geo-detection and popup framing, and AffilFinder's cross-origin iframe for the offer block inside the popup.
You will end up with a popup that:
- Fires only on geos you specify (configured in GeoTargetly).
- Shows a single, region-appropriate sponsored offer block (rendered by AffilFinder).
- Does not require any AffilFinder allowlist negotiation, CSP changes on your host page, or script tag permissions.
- Logs blocked / served / impression / click events you can reconcile against revenue.
This is the same pattern publishers use today to monetize geo-blocked traffic without weakening their core licensing posture. If you want the long-form rationale before the tutorial, read How to monetize geo-blocked traffic and iGaming traffic outside service area. Otherwise, let's build.
Why an iframe instead of a script tag#
AffilFinder ships two integration shapes for the section ad block:
1. Script tag: <script src="…/widget-section.js" data-pub=… data-website=…> — best for sites you control, since you can place the mount point exactly where you want it.
2. Cross-origin iframe: <iframe src="https://affilfinder.com/?pub=…&website=…"> — best for anywhere you cannot drop a script tag, including most no-code popup builders, lead-gen overlays, and CMS sandboxes.
Popup builders (GeoTargetly, OptinMonster, ConvertBox, Sleeknote, Wisepops) don't reliably let you ship a third-party <script> tag. They sanitize HTML, defer-load it, or run it inside a sandboxed shadow DOM. The iframe path sidesteps all of that — the offer block ships from affilfinder.com with Content-Security-Policy: frame-ancestors *, so any host page can embed it without coordination. Full reference lives in /docs/widget-iframe.
What you need before you start#
- An AffilFinder account with at least one website registered. Open the dashboard and copy your public key (
pub) and website key (website) from the Widget embed modal. If you haven't done this yet, follow Adding your first website. - A GeoTargetly account at dashboard.geotargetly.com. The free tier is enough to test.
- A page on your site you're willing to load while you test (you can scope GeoTargetly's targeting to a single URL during dev).
Step 1 — Create the popup in GeoTargetly#
1. Sign in at dashboard.geotargetly.com.
2. Click Add new popup → Custom HTML popup (the blank canvas option). Avoid the templated lead-gen popups — they wrap your HTML in their own structure that fights iframe sizing.
3. Name it something explicit, like AffilFinder — geo block fallback (US/UK). Future-you will thank present-you when you're managing five popups.
Step 2 — Paste the iframe HTML#
In GeoTargetly's HTML editor, paste this block. The container handles centering and the iframe handles the offer rendering — that's the whole integration:
<div style="
width: 500px;
max-width: 100%;
background-color: #ffffff;
font-family: Arial, sans-serif;
text-align: center;
padding: 20px;
border-radius: 12px;
box-shadow: 0 10px 30px rgba(0,0,0,0.15);
">
<h2 style="margin: 0 0 12px; font-size: 20px; color: #111;">
Not available in your region
</h2>
<p style="margin: 0 0 16px; color: #555; font-size: 14px;">
Here are options that work where you are:
</p>
<iframe
src="https://affilfinder.com/?pub=YOUR_PUBLIC_KEY&website=YOUR_WEBSITE_KEY"
style="width:100%;min-width:280px;min-height:320px;border:none;overflow:auto;"
title="Region-appropriate offers"
loading="lazy"
></iframe>
</div>Replace YOUR_PUBLIC_KEY and YOUR_WEBSITE_KEY with the keys from your AffilFinder dashboard. Both are safe to ship in client HTML — they're public-facing identifiers, scoped to the website you registered, and the API rejects requests from origins not on your allowlist.
Step 3 — Configure geo targeting in GeoTargetly#
This is the step that turns the popup into a precision instrument instead of a sledgehammer:
1. In GeoTargetly's targeting tab, set show on countries to the regions where your core product is blocked.
2. Set show once per session (or per day, depending on your tolerance) so legitimate users don't see it repeatedly.
3. Restrict to the specific page URLs that visitors land on when they're geo-blocked. If your block screen is /restricted or /not-available, target only those.
The most common mistake here is making the popup site-wide before you've validated it. Don't — fire it on one URL while you're still confirming the iframe renders correctly.
Step 4 — Test from a blocked geography#
You don't need a VPN if you don't want one — most popup builders let you preview as a specific country. In GeoTargetly:
1. Open the Preview tab.
2. Pick a country your popup is configured for.
3. Trigger the popup.
Confirm three things:
- The popup renders with your custom HTML wrapper.
- The iframe inside the popup loads (you should see the AffilFinder offer block render within ~1 second).
- Clicking an offer card opens the advertiser landing page in a new tab (
target="_blank"is set by the widget, which is what you want — the popup stays put).
If you don't see offers, jump to the troubleshooting section below.
Step 5 — Wire it into your real block path#
Now you can either:
- Let GeoTargetly handle the geo decision entirely (simpler — your site doesn't need to know).
- Or have your existing block screen detect the geo and trigger the popup explicitly via GeoTargetly's API.
For most publishers the first option is correct: you keep your normal "blocked" UI, and GeoTargetly layers the AffilFinder iframe on top of it for the same set of countries. The user gets a useful next step instead of a dead end. You don't have to touch your application code.
Sizing tips that actually matter#
- Width: clamp the wrapper at 500–560px on desktop; let
max-width:100%handle mobile. Wider than 560 wastes space; narrower starts wrapping the offer titles awkwardly. - Iframe min-height: 280–320px is the sweet spot. The widget renders up to six offers; if you're forcing a smaller area you'll get vertical scroll bars inside the popup.
- Iframe overflow: keep
overflow:autoso the iframe scrolls if the user has unusual font scaling. Don't setscrolling="no"— that breaks accessibility. - Mobile: GeoTargetly already centers the popup; your wrapper just needs
max-width:100%and adequate padding. Don't try to set a fixedvwwidth.
For a deeper sizing breakdown, see Iframe embed for popup builders.
Common errors and how to fix them#
Iframe is blank / shows AffilFinder marketing page. You're using https://affilfinder.com/ without query params. The iframe URL must include both pub and website. The dashboard generates the correct URL for you.
Iframe loads but no offers. Three likely causes:
1. The website's allowlist doesn't include the current host page domain. Open the AffilFinder dashboard and add the popup builder's preview domain (or your production domain) to the allowlist.
2. There are no offers configured for the visitor's region. Check the website's geo rules — see Configuring geo rules.
3. The website is paused. Re-enable it in the dashboard.
Popup fires for non-blocked users. GeoTargetly's targeting is too broad. Tighten the country list and / or scope to specific URLs. Don't fire the popup for users who can access your real product — it's a bad experience and trains them to dismiss real popups.
Iframe is squashed inside the popup. Your wrapper has height:auto but the iframe has no min-height. Always set min-height explicitly on the iframe.
Clicks don't track in your analytics. They won't, because the iframe is cross-origin. Use AffilFinder's dashboard for click and revenue analytics, and treat GeoTargetly's "popup viewed" event as your trigger metric. Trying to bridge them client-side adds complexity for no benefit.
Reconciling revenue across the two tools#
You'll have two analytics sources after this is live:
- GeoTargetly tells you how many times the popup was shown, dismissed, and clicked through.
- AffilFinder tells you how many offers were served, viewed, clicked, and (for CPA advertisers) converted.
Use AffilFinder's event log as the source of truth for revenue; use GeoTargetly's stats to A/B test the wrapper copy and trigger conditions. For attribution model tradeoffs, Cookieless affiliate attribution is the long version.
What this gives you#
In about fifteen minutes of work:
- Geo-blocked visitors see a useful, region-appropriate next step instead of a static error.
- You earn on PPC (or CPA, if you've configured CPA advertisers) for traffic that previously had a CPM of zero.
- Your core product's licensing posture is unchanged — the offer layer only fires on the blocked path.
- You can iterate on the popup design and trigger conditions without redeploying your site.
The same recipe works with OptinMonster, ConvertBox, Sleeknote, and most other popup builders — wherever you can paste raw HTML, you can paste this iframe. Full integration reference and FAQ live in /docs/widget-iframe.
Related: Iframe embed for popup builders (docs) · How to monetize geo-blocked traffic · Core Web Vitals and affiliate overlays
Ready to monetize blocked traffic?
Join publishers and advertisers turning blocked traffic into revenue. Sign in to configure sites and offers.
Sign InRelated articles
- Detecting VPN, Proxy, and Datacenter Traffic in 2026: A Pragmatic Guide for Affiliate PublishersResidential proxies, consumer VPN providers, and datacenter ranges all show up in affiliate inventory. Here is what each one actually means for monetization, how to detect them at the edge without killing latency, and how to decide which to allow, deny, or downweight.Read article
- Cookieless Affiliate Attribution in 2026: Server-Side Postbacks, First-Party IDs, and the End of Pixel TrackingThird-party cookies are gone, ITP and Brave block pixels, and Apple Mail Privacy Protection broke open-tracking. Here is the practical 2026 architecture for affiliate attribution that actually works — server-side postbacks, stable user IDs, deduplication, and how to ship it without ripping out your stack.Read article
- Geo-Targeting Accuracy in 2026: IP, GeoIP, GPS, and Why Your Country Detection Is Wrong 7% of the TimeCountry detection sounds trivial, but mobile carriers, VPNs, IPv6 transitions, and corporate proxies make it surprisingly noisy. Here is how modern geo-resolution actually works, where it breaks, and how to design overlays that survive false positives.Read article