Incoming JS Events to Consume
You may consume any of the following events that Explo can emit.
sendVariableUpdatedEvent
Description:
Sent when a new value is selected for a variable from a dashboard Element.
Output Parameters:
Parameter | Type | Description |
---|---|---|
varName | string | Name of the variable updated |
newValue | any | New value of the variable |
Example:
{
"detail": {
"varName": "string",
"newValue": "any"
}
}
dashboardReadyToLoad
Description:
Sent when dashboard information has been loaded and the dashboard itself is ready to render and to start loading data.
Output Parameters:
Parameter | Type | Description |
---|---|---|
dashboardId | string | ID of the dashboard from the URL param or HTML attribute. Empty string if not provided |
dashboardHeight | number | Estimated height in pixels of the dashboard. Use dashboardLoaded and dashboardUpdated events to get the actual height |
Output Example:
{
"detail": {
"dashboardId": "string",
"dashboardHeight": 0
}
}
dashboardLoaded
Description:
Sent when all initial data for a dashboard has been loaded.
Output Parameters:
Parameter | Type | Description |
---|---|---|
dashboardId | string | ID of the dashboard from the URL param or HTML attribute. Empty string if not provided |
dashboardHeight | number | Full height in pixels of the dashboard. Use to set the height of the iframe or Web Component |
Output Example:
{
"detail": {
"dashboardId": "exampleDashboardId",
"dashboardHeight": 100
}
}
dashboardUpdated
Description:
Sent when the contents of the dashboard changes.
Output Parameters:
Parameter | Type | Description |
---|---|---|
dashboardId | string | ID of the dashboard from the URL param or HTML attribute. Empty string if not provided |
dashboardHeight | number | Full height in pixels of the dashboard. Use to set the height of the iframe or Web Component |
Output Example:
{
"detail": {
"dashboardId": "exampleDashboardId",
"dashboardHeight": 100
}
}
analyticsEventFired
Description:
Fires when one of the selected actions on the Analytics settings page has been performed. Refer to the analytics events documentation for more details.
customerJwtExpired
Description:
Fires when the current JWT expires. Refer to the updateCustomerJwt event for programmatically updating the JWT.
error
Description: Sent when the dashboard encounters an error. Please reach out to Explo support if you want this enabled for your workspace.
Output Example:
{
detail: {
error: "Error message",
user_id: "123", // Unique identifier for end user
properties: {
dashboard_type: "iframe",
embed_source: "iframe",
team_id: 1,
team_name: "Explo",
customer_id: 1,
customer_name: "Customer 1",
customer_provided_id: "1",
// If error occurred in Report Builder:
report_builder_id: 15, // Report Builder ID
report_builder_name: "hello", // Report Builder Name
// If error occurred in Dashboard:
dashboard_template_id: 12,
dashboard_template_name: "hello",
data_panel_id: "fdasf",
// If error occured on dataset
dataset_id: 123,
},
},
}