- dashboards, lite dashboards
- visual authoring experience
- source editor
insightsoftware recommends using Trusted Access for all embed-related workflows.
- The mode setting for the dashboard. If the embed mode is
readonlyor Read Only, no menu is available at all. - The visual interactivity settings specified in the visual definition.
- The dashboard interactivity settings specified for the dashboard, if those settings include override interactivity settings for all visuals in the dashboard.
editor.placement property.
-
If
editor.placementis set todockRight, the options appear in sidebars using the visual sidebar menu and the resulting sidebar editing panels. Ifeditor.placementis set tomodals, the options appear in the visual drop-down menu itself and the resulting floating dialogs.
In environments where you use Typescript for your client side code, you can use Embed Manager as an npm package. See https://www.npmjs.com/package/logi-embed.
- Embedded Component Prerequisites
- Embeddable Component Snippets
- Generate a Visual Gallery HTML Snippet
- Embed Dashboards
- Embedded Self-Service Analytics Component Controls
- Embed Multiple Dashboards On a Single Page
Embedded Component Prerequisites
To embed a Self-Service Analytics component into your own application, the following prerequisites must be met:- You must have created a host application into which you want to embed the component.
-
Trusted Access, enabled by default, must be enabled and configured to authenticate users of your embedded components. See Trusted Access. Be sure that your application is registered as a Self-Service Analytics client and that you have met the prerequisites of Trusted Access.
insightsoftware recommends using Trusted Access for all embed-related workflows.
- Cross-origin sharing (CORS) must be enabled for your Self-Service Analytics instance. See Enable Self-Service Analytics Component Access From Other Sites Using Cross-Origin Resource Sharing (CORS).
- You need to be a Self-Service Analytics administrator or a user assigned to a group with the Generate Embed Code privilege so you can generate library, visual gallery, or sources inventory snippets used for embedding.
Content Security Policy Support for Embedded Pages
Pages that include embedded Self-Service Analytics content can include content security policies with some restrictions. Some guidelines for creating these policies include:script-srcAllow the domain used to serve Self-Service Analytics.unsafe-inlineor anonceis required.unsafe-evalis not required.style-srcAllow the domain used to serve Self-Service Analytics.unsafe-inlineis required;nonceis not yet supported.unsafe-evalis not required.font-srcAllow the domain used to serve Self-Service Analytics. Allowdata:for embedded fonts.
Using Nonce
If you want to omitunsafe-inline for script-src, you must use a nonce in the page. The nonce should be a unique string that changes on each new page load.
To instruct the page that the nonce is allowed, include it in the script-src portion of your content security policy definition as nonce-<random string>. Next, add the same string as the value of the nonce attribute on the script tag you use to import the Self-Service Analytics embed, as well as any scripts that call those embed functions.
When this is included, the embed system will include the nonce on any inline script tags it creates.
Example: index.html
Embed Multiple Dashboards On a Single Page
You can embed multiple dashboards on a single page of your application and in a single<div> in your application, including embedding one or more empty dashboards. You can also embed the same dashboard multiple times on a page and each embedded instance can use its own property settings (theme, mode, header, title). Finally, the dashboards can be embedded using different methods: you can embed one dashboard using generated embed code and another dashboard using JavaScript.
When more than one dashboard is embedded in application, the cross-visual filters that are published for a visual on one of the dashboards can be subscribed to by any visual on any of the embedded dashboards. However, this is not true unless the dashboards are embedded in the same application. Visuals in a dashboard open in one window or tab cannot subscribe to cross-visual filters published by visuals in a different window or tab.