Option 2: iFrame
Embed Explo report builders through an iFrame
What is an iFrame?
The HTML Inline Frame element (<iframe>
) represents a nested browsing context, embedding another HTML page into the current one. You can read more about iFrames here.
Where can I use the component?
Since the web component is an HTML element, you can use it in any context:
-
Directly in an HTML file
-
Define it in vanilla JS
-
Any JS web framework: React, Vue, Angular, etc
Constructing the iFrame Link
The iFrame is powered by an Explo URL that will need to be constructed.
Use an Embed Secret (Recommended)
https://app.explo.co/report-builder/iframe/<jwt>/<environment>
Use a Report Builder Id and Customer Token
https://app.explo.co/report-builder/iframe/<report_builder_id>/<customer_token>/<environment>
URL Attributes
Attribute Name | Type | Description |
---|---|---|
jwt (recommended) | string | This is the embed secret (JWT) for the report builder. We recommend you use this attribute instead of the report_builder_id and customer_token . Read more about embed secrets here. |
report_builder_id | string | This is the embed id that you retrieve from the Explo application. |
customer_token | string | The customer_token is the token you use to identify the customer that is viewing the report builder. This is retrieved via the Customer API. |
environment | string | The environment name (such as production or staging) that you would like to embed. If no environment is provided, the most recent saved version will be rendered. |
locale_code | string | An optional argument that overrides any localization settings for your team. This will localize your report builder’s numbers, currencies, and dates to the desired locale, if supported. |
currency_code | string | An optional argument that overrides any currency localization settings for your team. This will localize your report builder’s currency symbols and format to the desired locale, if supported. |
timezone | string | An optional argument that allows you to specify a timezone to display dates in. Valid values can be found here. |
theme | string | An optional argument that lets you manage multiple style/theme profiles within Explo. If not provided, uses the “default” theme. |
Embedding the iFrame Link
Embed the iFrame below into your web application. The iFrame is backward-compatible with the previous Report Builder Customer Token syntax, but we recommend using the Embed Secret (JWT) syntax. Read more about embed secrets here.
Please also note these instructions when embedding a report builder.