Embedded card reference
Options, appearance settings and error codes for the LegitGeo visibility card you mount on your own page.
Mount the card
LegitGeo.mount(target, options) returns { refresh(), destroy() }. The card loads when it scrolls into view, resizes to its content (300 to 760 px wide works) and receives its secret by postMessage, never in a URL. Both sides check the other’s origin.
Options
fetchClientSecret (required) resolves to a lges_… secret from your server, and is called again when a session times out. fetchLoginLink (optional) resolves to a one-time report link and turns on See full report. onReportRequested runs when that button is selected so you can navigate yourself. partner is your slug when the script tag has no data-partner.
appearance.accent is #RRGGBB, appearance.radius is 0 to 24, appearance.font is system, inter or serif (fonts already on the device, nothing downloaded) and appearance.colorScheme is light, dark or auto. To set these without code, see Brand the embedded visibility card.
Errors
onError(err) receives err.code: load_failed, client_secret_failed, session_expired or login_link_failed. The card runs under a strict content security policy with no third-party code, and only loads in frames from your allowed origins.