ReTarget.gg
Integrate

Iframe embed for popup builders

Drop ReTarget.gg offers into a GeoTargetly-style popup with a single iframe: no script tag, no allowlist negotiation, two query params.

7 min readReviewed Apr 27, 2026

Some publishers can't drop a global <script> tag: for example when offers need to render inside a popup built with GeoTargetly, OptinMonster, ConvertBox, Sleeknote, Wisepops, Privy, or any no-code overlay tool. ReTarget.gg ships a tiny cross-origin iframe that renders the same section ad block as widget-section.js, with just two query params: no script, no allowlist negotiation, no host-page CORS to debug.

Public key + website key required

TL;DR

<iframe
  src="https://retarget.gg/?pub=YOUR_PUBLIC_KEY&website=YOUR_WEBSITE_KEY"
  style="width:100%;min-width:320px;min-height:280px;border:none;overflow:auto;"
  title="Offers"
></iframe>

Paste into your popup builder, replace the two placeholders, done.

When to use this

Use the iframe when all of these are true:

  • You can paste arbitrary HTML into a popup / modal / banner builder.
  • You can't add a top-level <script> tag to the page (the popup tool sandboxes its content, or the page is locked down by your CMS or consent manager).
  • You're OK with a single ReTarget.gg offer block rendering inside the popup: no full-page geo overlay, no Trigger Widget flow.

If you can add a regular script tag, prefer the Section widget or Geo-blocking widget. They're lighter, give you layout control, and can talk to the host page (events, resize, etc.).

How it works

  1. Iframe loads with your keys

    Pass your public key (pub=…) and website key (website=…) as query params. The iframe URL resolves to a hosted view tied to your website.

  2. Offers render inside the iframe

    The hosted view fetches a decision and: if the visitor is on the blocked side: up to 6 offer cards for their country. All traffic is attributed to the website whose keys you passed.

  3. Clicks open in a new tab

    Offer clicks open in a new tab so your popup stays put. Attribution and earnings land in the same Websites → Analytics page as the script-tag embeds.

The iframe is designed to be embedded cross-origin, so any parent page can frame it.

Step-by-step: GeoTargetly

GeoTargetly is the most common pairing because it lets you fire popups based on country / region. Fresh-account walkthrough:

1. Create the popup

  1. Sign in to dashboard.geotargetly.com.
  2. Add new popup → Custom HTML popup (the "blank canvas" option). Avoid the templated lead-gen popups.
  3. Name it something memorable: ReTarget.gg: geo block fallback.

2. Paste the HTML

<div style="
  width: 500px;
  max-width: 100%;
  background-color: #ffffff;
  font-family: Arial, sans-serif;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
  border-radius: 10px;
">
  <div style="margin-bottom: 20px;">
    <h2 style="margin-bottom: 10px; font-size: 20px; color: #333;">
      Service Not Available in Your Location
    </h2>
    <p style="font-size: 14px; color: #555; line-height: 1.5;">
      We're sorry, but our services are not currently available in your region
      due to geographic compliance requirements.
    </p>
    <p style="font-size: 13px; color: #777; margin-top: 10px;">
      Thank you for your understanding.
    </p>
  </div>
 
  <div style="width: 100%;">
    <iframe
      src="https://retarget.gg/?pub=YOUR_PUBLIC_KEY&website=YOUR_WEBSITE_KEY"
      style="width:100%;min-width:320px;min-height:280px;border:none;overflow:auto;"
      title="Offers"
    ></iframe>
  </div>
</div>

3. Find your keys

  1. ReTarget.gg dashboard → Websites → click your site.
  2. On the site detail page, find the Integration keys section: copy the pk_… into pub= and the web_… into website=.

4. Targeting and triggers

In GeoTargetly:

  • Geo target → Show to visitors from: any country / region your main product doesn't support.
  • Display rules: On page load or After 2 seconds: ReTarget.gg loads offers async, so pop immediately is fine.
  • Frequency: 1 per session keeps the UX clean.

5. Pick the pages

In the Pages tab, choose where this popup fires. Most publishers set /* so blocked traffic always sees an alternative.

6. Activate

Save, activate, and the iframe is live for matching visitors.

Other popup builders

The same HTML works in any builder that accepts custom markup:

BuilderWhere to pasteNotes
OptinMonster"Custom HTML" elementDisable OptinMonster's "Yes/No" or "Optin" form: you don't need them.
ConvertBox"HTML / embed" blockSet block width to 100%.
Sleeknote"Custom HTML" elementEditor adds a max-width wrapper: set to at least 320px.
Wisepops"Custom HTML" widgetTick "Allow this widget to receive third-party content".
Klaviyo Forms (Pro)"Custom HTML" blockUse min-height: 320px.
Hello Bar"Custom HTML" templateBest for full-screen takeovers.
Privy (Plus)"Custom HTML" elementAvailable only on Plus plan.

Required query params

ParamRequiredWhat it is
pubyesPublic key (pk_xxxxxxxxxxxx_xxxxxxxx).
websiteyesWebsite key (web_xxxxxxxxxxxxxxxx).

Missing either key and the iframe falls back to the marketing homepage: so if you see marketing copy inside the iframe, you forgot a key. data-pub / data-website are accepted as aliases, but pub / website is canonical.

Sizing

The iframe is fixed: it does not auto-resize to its content. Sensible defaults:

CSSReason
width: 100%Fill the popup container.
min-width: 320pxPhone-friendly without horizontal scroll.
min-height: 280pxFits 3 to 4 offer cards on most layouts.
min-height: 480pxFits the full 6-card grid without inner scroll.
overflow: autoGraceful fallback for short popups.
border: noneRemove the default iframe border.

Small bottom-bar popups: min-height: 200px collapses to a 2-card carousel. Full-screen takeovers: height: 100% and let the parent size everything.

Styling

You can't restyle the cards: browsers sandbox cross-origin frames. What you can style:

  • Popup background, padding, border radius, drop shadow.
  • Headline and explainer copy around the iframe.
  • Close button (if your builder doesn't ship one).
  • Logos or branding.

Pick a popup background that contrasts with the iframe's white card background (soft grey or your brand color works). Keep the surrounding copy short: visitors should understand "these are alternative offers" within 2 to 3 seconds.

Parent domain

Each ReTarget.gg website is bound to a single registered domain. The iframe is designed to be embedded from any parent page, so what matters for your analytics is that the pub / website keys in the iframe src match the website you expect the traffic to land on.

If you need to run offers on two distinct parent domains, register each as its own website in the dashboard and use the corresponding keys in each popup.

Limitations vs script-tag embed

FeatureIframeSection / geo widget
Full-page geo overlay✅ (widget.js)
Trigger Widget flow✅ (widget-decline.js)
SDK hooks (events, resize)
Auto-resize✅ (section widget)
Deep customization✅ (layout + container)

If any of these matter, use Section or Geo-blocking directly.

Testing

  1. Local visit

    Trigger the popup from your own browser. If you're inside an allowed country, the popup probably won't fire: that's geo rules doing their job.

  2. VPN test

    Connect to a blocked country that has active advertisers (US, UK, Germany, Australia, Canada are reliable). Reload and the iframe should fill with 3 to 6 cards.

  3. Click test

    Click an offer. It opens the advertiser's landing page in a new tab; your popup stays put.

  4. Reporting check

    Dashboard → Websites → [your site] shows new impressions on your next refresh. Clicks appear once the invalid-click filter clears them.

Common errors

SymptomFix
Marketing homepage inside iframeMissing / mistyped pub or website. Re-copy from the dashboard.
"No offers available in your region"No active advertisers for that country. Test with a US/UK VPN.
Popup never firesPopup-builder issue. Disable the builder's geo rules temporarily to confirm.
Iframe cut off / scrollablemin-height too low. Bump to 320px+.
X-Frame-Options: DENY errorYou embedded the wrong URL. Only the query-param form https://retarget.gg/?pub=…&website=… is designed to be iframed.
Clicks freeze the pageConsent / privacy plugin intercepting iframe clicks. Allowlist *.retarget.gg in your CMP.

FAQ

Does the iframe count toward my ReTarget.gg analytics? Yes: every iframe load is one impression, every click is one click for the website key in the src. Same reporting as script-tag embeds.

Do I need a separate website key per popup tool? No. One website key per site (parent domain). Fire the same iframe from multiple popups without issue.

Will it slow down my page? The iframe loads lazily inside the popup: which itself fires after the builder's own script: so it doesn't block the parent page's rendering.

Can I change which offers are shown? Offer eligibility comes from the ReTarget.gg marketplace; you can't hand-pick offers from the iframe. To narrow the marketplace, restrict Verticals on your website.

Is it GDPR / consent-safe? The iframe doesn't set first-party cookies on the parent page. It does fire ReTarget.gg's own analytics inside the iframe (see Privacy). If you want explicit consent, render the popup only after marketing cookies are accepted in your CMP.

Need help with setup?

Send us your website stack, target regions, and whether you are installing Geo Popup or Decline Popup.

Iframe embed for popup builders | Docs | ReTarget.gg