Geo-blocking widget
Use this embed when you want a full-screen sponsored-offer experience for visitors who are not on your geo allowlist — typical for licensed or region-restricted products.
Install
Add the script to your or before . Replace YOUR_PUBLIC_KEY and YOUR_WEBSITE_KEY with values from Integration keys on the website detail page.
<script
src="https://affilfinder.com/widget.js"
data-pub="YOUR_PUBLIC_KEY"
data-website="YOUR_WEBSITE_KEY"
></script>How it works
1. The script calls the decision endpoint with your keys and the visitor’s location.
2. If the visitor is allowed (per geo rules), nothing is shown.
3. If blocked, the script loads offers and renders the overlay (container #affilfinder-root, created automatically).
4. Impressions and clicks are recorded; clicks go through AffilFinder’s redirect so revenue attributes correctly.
Optional attributes
| Attribute | Purpose |
|---|---|
data-api | Override the API base URL (default https://api.affilfinder.com). Useful for staging. |
data-comments="false" | Less console logging from the snippet. |
data-dev-country / data-dev-region | Development only — simulate location (e.g. DE, BY). |
Your page’s origin must match the domain configured for the website in the dashboard (CORS).
Iframe setups
If you use a third-party geo gate (e.g. GeoTargetly) with an iframe, point the blocked URL to a page on your domain that loads this same script — often your homepage or a dedicated blocked.html. The overlay behaves the same inside the iframe.
The dashboard Widget installation modal includes snippets pre-filled for your keys.
Related
- Section widget — inline placements instead of full page.
- Widget integration reference — full attribute list and API flow.
- REST API reference —
/v1/decision,/v1/offers, events.
Need more help?
Can't find what you're looking for? Reach out to our team and we'll get you sorted.