Embedding Methods
  • 03 Nov 2022
  • 3 Minutes to read
  • Dark
    Light

Embedding Methods

  • Dark
    Light

Different Ways to Embed Sisense

There are 3 different ways that Sisense can be embedded:

  • IFrame (Inline Frame) - This is the basic method of opening a “window” to another website while in a different website.
  • Embed SDK - This uses the IFrame approach to display, while adding APIs to help manage the dashboard.
  • Sisense JS - This is the most powerful method of the three, enabling individual loading of widgets, filters, scripts, and more.

Selecting the best method for you is an important decision, which requires understanding each and weighing their pros and cons as they relate to your needs.

IFrame

An IFrame loads a target page into your embedding website. You can think of it as placing a website within a website. 

This is the quickest and easiest way to embed Sisense dashboards into your web application. Using IFrames is a great solution for simple embedding use-cases and Sisense has built-in support for it. You can even append query parameters to the dashboard’s URL to adjust the UI, as needed.

For implementation information, see the Sisense Developer site.

The following table lists the Pros and Cons of using an IFrame for embedding Sisense:

Pros

Cons

Easy and fast deployment

Slower to load (loads almost the entire webapp)

Looks and behaves the same as the source

Not dynamic or customizable

Embed SDK

While using an IFrame, Embed SDK enables implementing additional code to provide some advanced options.


Note: The Sisense Embed SDK is supported by Sisense for Linux V8.2.1 or newer.

Embed SDK enables tighter integration with the host application with minimal code. Delivered as a JavaScript library, the Embed SDK minimizes developer resources to manage complex communication between the host application and embedded analytics. The Embed SDK is an abstracted embedded interface that wraps an IFrame element. With Embed SDK you can programmatically:

  • Render a Sisense IFrame element or hook to an existing one
  • Subscribe to various events fired within Sisense
  • Execute commands like adding and removing filters, or exporting dashboards
  • Access information about the state of the Sisense application within the IFrame

The SDK removes all the hassle and risk and significantly speeds up development and integration.

For implementation information, see the Sisense Developer site.

The following table lists the Pros and Cons of using Embed SDK for embedding Sisense:

Pros

Cons

Can handle some custom filtering

Not all events\methods\objects are available

Enables some event handling

Limited customization


Requires coding knowledge

Sisense JS

Sisense JS is a JavaScript library dedicated to embedding individual dashboards, widgets, and filters in web applications so that they can be displayed and managed (without using IFrames).

With the Sisense JS library, you can:

  • Load Sisense runtime anywhere, without IFrames
  • Load dashboards in runtime
  • Render all, part, and new widgets in any DOM container
  • Embed Sisense visualizations into your mobile applications

For implementation information, see the Sisense Developer site.

The following table lists the Pros and Cons of using Sisense JS for embedding Sisense:

Pros

Cons

Very customizable (styles, layouts, scripts, events and more)

Requires coding knowledge

Full access to the Prism obj

Advanced cases may require longer time to market

Selecting the Best Method for You to Embed Sisense

The following table depicts various potential needs, and which method best suits those needs.

Bottom Line

  • If your primary concerns are time to market and native functionality on the dashboard, you should choose an IFrame.
  • If you need custom scripting, layouts, styles events and advanced functionalities on the dashboard and syncing or effecting/using your app, choose Sisense JS.
  • If you are planning to invest some developer time in the project, you should usually choose Sisense JS. This is unless you require editing capabilities, in which case you may want a mixture of Sisense JS for a snappy user experience and clean matching layout for viewers on your website, and Embed SDK for editing and managing dashboards in your app.

For more information, see: https://sisense.dev/guides/embedding/ 

To try the different embedding options, see the “Solutions” section of the playground: https://sisense.dev/playground 





Was this article helpful?