📊Embedding Vizpads
Learn how to embed Tellius Vizpads into your application using iFrame URLs and postMessage integration for interactive analytics.
Using the following steps, you can embed (using iFrame) Vizpad into your app.
The embedded app refers to Tellius, whereas the embedding app refers to the app in which Tellius components are to be integrated.
Get the embedding URL from Tellius.
Include the embedding URL in the HTML of the required app.
Connect the app with Tellius.
Getting the embedding URL
There are two ways in which you can obtain the embedding URL: directly from the Vizpad or from Settings.
From a Vizpad
Open the required Vizpad in the Vizpad module, click the three-dot menu at the top right and click Embed. The Generate Embed URL dialog opens, with the Vizpad's name next to Generating URL for.

Set the options for the URL:
Direct Access URL: when on, people who open the URL go straight to the Vizpad. When off, they're sent to the Tellius login page first. When you turn it on, Expiry time of URL appears: enter a number from 1 to 100 and pick Hours, Days or Months. After that time, the URL stops working.
Access to global filters type: what viewers can do with the Vizpad's global filters: View, Edit or Hide.
Access Type: the permission the URL grants: Read or Write. Use Read unless viewers need to change the Vizpad.
Row Level Policy: turn it on when your app sends row-level filters for each user. See Row-level policy filters.
Click Generate URL, then copy the URL. Click Cancel to close the dialog without generating a URL.

In releases before Tellius 6.4, you opened the Vizpad under Explore, clicked Share at the top right corner, clicked Generate Embed URL, selected the permission (view/edit) and clicked Copy.
From Settings
Navigate Settings → Modules → Embedding → Dashboard. The list of existing Vizpads is displayed.
For the required Vizpad, click on the Copy button under Embed URL.

Including the obtained URL
An embedding URL looks like the following:
http://domain/dashboard/vizpadId/tabId/?utm_source=ID
Once you embed the URL, the required Vizpad will be loaded.
Components of the embedding URL
vizpadId- the ID of the Vizpad to be embeddedtabId- As per the tabID specified in the embedding URL, the current tab will be set.utm_source- the embed key that Tellius adds when it generates the URL. It carries the options chosen in the Generate Embed URL dialog.
Connecting with Tellius
The embedding app needs to send a message
INITIALIZEto connect with Tellius.Tellius validates and responds with
TELLIUS_INITIALIZEDmessage as an acknowledgment.After receiving
TELLIUS_INITIALIZEDmessage, the required filters can be applied.
The following is a sample code to connect with Tellius:
As furnished in the code above, we use window.postMessage for communication between Tellius and the embedding app (two-way communication). The messages which are sent to Tellius from the embedding app are included in telliusFrame.postMessage(). With the help of the function postMessage, required actions can be performed.
To enable this communication and to receive messages, the embedding app needs to have eventListener. For every point clicked, or area selected/highlighted in the chart, Tellius will send a message to the embedding app.
Structure of a Vizpad
Each Vizpad consists of one or more tabs. Each tab can have multiple Viz. A Viz is a chart widget, and it is a component of a Vizpad. The following sample code shows the structure of a Vizpad and a Viz.
Utmost, a Vizpad can have 10 tabs, and a tab can have 25 Viz.
Structure of a Viz
Was this helpful?