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.
Overview
Embedding works through a secure token-based authentication mechanism:- Your application generates a signed JWT token containing the necessary parameters
- This token is used to construct an iframe URL
- 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
3. Embed the App
Insert an iframe in your application pointing to the generated URL:
Embedding Parameters
The JWT token payload can include the following parameters:Parameter | Type | Description |
---|---|---|
intelligent_app_id | string | Required. The ID of your Intelligent App |
email | string | Email of the user viewing the app (for access control and analytics) |
user_id | string | Optional ID of the user in your system |
variables | object | Initial values for app variables |
filter_values | object | Initial values for filter components |
config_overwrite | object | Override app configuration settings |
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:- Check that your token is signed correctly with the right secret key
- Verify that the Intelligent App ID is correct
- Ensure your domain is allowed for embedding (contact Datazone support if needed)
- Look for CORS or CSP issues in your browser’s developer tools
Next Steps
- Customize App Appearance - Learn about configuration options
- Working with Variables - Learn how to use variables in your app
- Contact Support - Get help with embedding setup