Eagle Landed

Embed the widget

Add business-email verification to any page with a single <iframe> and a postMessage listener.

Add the iframe

Place this snippet where you want the widget to appear. The widget is transparent — it inherits your page's background.

html
<iframe
  id="eagle-landed-widget"
  src="https://eagle-landed.happycactus.app/widget"
  title="Email verification"
  width="400"
  height="320"
  style="border:none;background:transparent;"
  allow="clipboard-write"
></iframe>

Listen for the verified event

When the user successfully verifies their email the widget fires a postMessage to the parent window. Always verify event.origin in production.

javascript
window.addEventListener('message', function (event) {
  // Always verify the origin in production!
  if (event.origin !== 'https://eagle-landed.happycactus.app') return;

  if (event.data?.type === 'eagle-landed:verified') {
    const { email, domain, verifiedAt } = event.data;
    console.log('Verified:', email, domain, verifiedAt);

    // Example: unlock your next step
    document.getElementById('eagle-landed-widget').remove();
    showNextStep({ email, domain });
  }
});

Event payload

FieldTypeDescription
typestring"eagle-landed:verified" — always check this first
emailstringThe verified email address
domainstringThe email domain, e.g. "company.com"
verifiedAtstringISO 8601 timestamp of verification

The widget requires a valid ALLOWED_EMBED_ORIGINS environment variable in production to restrict which domains can embed the widget.