This guide will walk you through embedding Census connect links into your own application.
iframe
in your application, pointing to a Census connect link. To see a working example, check out our Embedded Demo application (source code).
Initial Setup
iframe
in. For instance, https://my-site.com
. Only approved URLs
are allowed to embed these components. Before you get started, you’ll
need to provide your Census account manager with your URL(s), or reach
out to us at support@getcensus.com.Generate a Source Connect Link
Embed the Source Connect Link in an iframe
Handle events from the iframe
iframe
emits events using the postMessage API.
You can see an example of how to handle these messages in our Demo app repo.
The following events are available to help you manage the iframe
lifecycle, via the data
property of the message:LoadedThis event indicates the iframe
is ready to be shown to the user.