Skip to main content

Embedding Intelligent Apps

Datazone allows you to embed your Intelligent Apps directly into your own applications using a simple iframe approach. This enables you to integrate powerful data visualizations and dashboards into your product while maintaining your own application’s user experience.
embedding

Overview

Embedding works through a secure token-based authentication mechanism:
  1. Your application generates a signed JWT token containing the necessary parameters
  2. This token is used to construct an iframe URL
  3. The iframe renders your Intelligent App inside your application

Integration Steps

1. Prerequisites

  • An Intelligent App in your Datazone account. You can look at Intelligent Apps to create your first app.
  • Go to Intelligent App settings page under the Project section and click the Access Control tab to enable embedding and get your code snippet.
  • A web application where you want to embed the Intelligent App

2. Example Code Snippet

You can use user_id instead of email in the payload for user identification based on your application’s needs.

3. Embed the App

Insert an iframe in your application pointing to the generated URL:
source-empty

Embedding Parameters

The JWT token payload can include the following parameters:

Example: Setting Initial Variables and Filters

Example: Overriding App Configuration

You can override app configuration settings:

Security Considerations

  • Keep your Datazone secret key secure and never expose it in client-side code
  • Generate tokens server-side and pass the complete iframe URL to your frontend
  • Set appropriate content security policies for iframe embedding
  • Consider implementing additional authentication mechanisms if needed

Example: Full Server-Side Implementation

Here’s a more complete example using Node.js/Express:

Customizing the Embedded Experience

You can customize how your embedded app appears by overriding configuration settings in the token:

Troubleshooting

If your embedded app isn’t loading correctly:
  1. Check that your token is signed correctly with the right secret key
  2. Verify that the Intelligent App ID is correct
  3. Ensure your domain is allowed for embedding (contact Datazone support if needed)
  4. Look for CORS or CSP issues in your browser’s developer tools

Next Steps