Introduction to the Embedding SDK
The Embedding SDK allows you to quickly integrate a MicroStrategy dashboard into a web application in a responsive manner. It also provides resources to add functionality such as controlling navigation, retrieving and applying filters, setting properties, and managing events, and supports several different authentication environments.
There are three basic steps for embedding a dashboard.
-
In the initial page of your web application, add a link to the MicroStrategy JavaScript Embedding SDK.
<script src="{YOUR_LIBRARY_SERVER_URL}/javascript/embeddinglib.js"></script>
Replace
{YOUR_LIBRARY_SERVER_URL}
with your actual MicroStrategy Library Server URL, e.g., https://demo.microstrategy.com/MicroStrategyLibrary.tipIf the application server is different from the server running the MicroStrategyLibrary application, you may need to perform additional configuration to support Cross-Origin Resource Sharing (CORS).
-
Create a
<div>
as the placeholder where you want to embed the dashboard.<div id="dossierContainer"></div>
-
Call the
microstrategy.dossier.create(props)
method when the application has finished loading.const placeholderDiv = document.getElementById("dossierContainer");
microstrategy.dossier.create({
placeholder: placeholderDiv,
url: "{YOUR_LIBRARY_SERVER_URL}/app/{PROJECT_ID}/{DOSSIER_ID}",
});tipCheck out all the properties you can set in the
microstrategy.dossier.create(props)
method. You can do many things with the properties. To name a few, you can set filters, show/hide UI elements, and adjust the size of the embedded dashboard.
To help you get started, we have provided a number of simple applications with sample code and explanations.
-
Support for different authentication environments
Examples that display an embedded dashboard in different authentication environments
-
Examples that add functionality, such as controlling navigation, retrieving and applying filters, setting properties, and managing events like page changes
-
A playground for developers to build impactful, interactive analytics experiences that integrate seamlessly with websites and applications.
To see changes to the Embedding SDK in the current release, refer to What's new.