Skip to main content

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.

  1. 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.

    tip

    If 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).

  2. Create a <div> as the placeholder where you want to embed the dashboard.

    <div id="dossierContainer"></div>
  3. 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}",
    });
    tip

    Check 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

  • Add functionality

    Examples that add functionality, such as controlling navigation, retrieving and applying filters, setting properties, and managing events like page changes

  • Embedding SDK Playground

    A playground for developers to build impactful, interactive analytics experiences that integrate seamlessly with websites and applications.

  • More Embedding SDK examples on Github

    A collection of examples highlighting functionality and workflows of the Embedding SDK. You can play with the examples with no setup.

To see changes to the Embedding SDK in the current release, refer to What's new.