Skip to main content

Customization & Interactivity

Embedded content can be customized with dashboard themes, vanity domains and you can also increase the interactivity of embed content with linking, javascript events, and post messages.

Vanity Domains

🪞 You may want to implement the use of a vanity domain for your embedded dashboards if you need to utilize first-party cookies or would like to have cohesive branding of the content you share with your clients.

  • This feature is only available for private embed use cases.
  • Only one vanity domain is allowed per Omni organization.
  • Have a multi-part domain like products.ecommerce.com or dev.products.ecommerce.com.
How to...
  1. 📧 Start this process by reaching out to support@omni.co with the following information:

    • Provide the vanity domain you are interested in, e.g. products.ecommerce.com

    • Key considerations:

      • Note that a vanity domain must have three, or more, parts like the example above - ecommerce.com without “products” prepended will not be considered a valid vanity domain.
      • The top level domain of the vanity domain must match the embedding page to support first party cookies.
        • If your embedding page is ecommerce.com, then your embedded vanity domain should be omni.ecommerce.com
        • If your embedding page is ecommerce.com and you provide an embedded vanity domain of ecommerce.omni.com then you may still run into third-party cookie limitations on some browsers like Safari or other iOS applications.
  2. Your dedicated Omni team will reach back out with DNS configuration details and ask that you update your DNS configuration.

  3. Once confirmed it is updated with Omni, the team can complete the next configuration steps.

  4. Your Omni team will let you know once all of the settings are enabled and ready for you to start rocking that vanity domain 🤘

Linking to Other Content

The Markdown component can be used to build links to other Omni content, like other dashboards. These links work seamlessly within the app, and don't require any complex iframe manipulation.

Embed SSO requires enabling link access:
  • You'll need to specify __omni_link_access_open in the Link Access parameter to permit linking in an embed session.

Linking is as easy as setting an <a> tag's href in markdown to the relative path of a piece of content, like a dashboard.

Example:

## Dashboards

1. <a href="/dashboards/123abc">Product Dashboard</a>
2. <a href="/dashboards/789xyz">Sales Dashboard</a>

You can also link filters between dashboards using mustache references to the filter values. For example, if you have a filter on Traffic Source you can reference it like so:

<a href="/dashboards/123abc?f--users.traffic_source={{filters.users.traffic_source.json}}">Product Dashboard</a>

This allows linking of dashboard and dashboard state across multiple dashboards.

Event Messaging

Javascript events

View certain interactions from the iframe out to the parent frame via javascript events. Events will have the following shape:

type EmbedEvent<Payload> = {
payload: Payload
description: string
name: EmbedEventName
}

Omni currently supports the following events:

Filter event: This will trigger when a user applies a filter to a document within an iframe

Event Name: dashboard:filters

Payload:

{
'users.id': {
filter: {
is_negative: false,
kind: 'EQUALS'
...
},
asJsonUrlSearchParam: 'f--users.id=%7B"is_inclusive"%3Afalse%2C"is_negative"%3Afalse%2C"kind"%3A"EQUALS"%2C"type"%3A"number"%2C"values"%3A%5B"3"%5D%7D'
}
}

Dashboard download event: This will trigger when a user downloads the dashboard

Event Name: dashboard:download

Payload:

userId: string - id of the user who downloaded the dashboard
dashboard: {
filters: {
[filterName: string]: {
filter: Filter object - complex object representing the filter
asJsonUrlSearchParam: string - filter as a JSON URL search param that can be used in dashboard urls
}
}
href: string - full url of the dashboard
urlId: string - id of the dashboard used in the url
path: string - path to the dashboard
title: string - title of the dashboard
}
format: string - one of 'pdf', 'csv', 'xlsx'

Tile download event: This will trigger when a user downloads a given tile on a dashboard

Event Name: tile:download

Payload:

userId: string - id of the user who downloaded the dashboard
dashboard: {
filters: {
[filterName: string]: {
filter: Filter object - complex object representing the filter
asJsonUrlSearchParam: string - filter as a JSON URL search param that can be used in dashboard urls
}
}
href: string - full url of the dashboard
urlId: string - id of the dashboard used in the url
path: string - path to the dashboard
title: string - title of the dashboard
}
format: string - one of 'csv', 'xlsx', 'png'
tile: {
id: string - id of the tile
title: string - title of the tile
appliedFilters: { - filters applied to the tile
[filterName: string]: {
filter: Filter object - complex object representing the filter
asJsonUrlSearchParam: string - filter as a JSON URL search param that can be used in dashboard urls
}
}
}

Dashboard size event: This will trigger on dashboard load to give the size of the frame, allowing users to dynamically size the iframe.

Event Name: size

Payload:

type EmbedSizeEvent = {
payload: {width?: number, height?: number}
description: `returns a {width?: number, height?: number} object representing the total height of the document`
name: 'size'
}

Dashboard status event: This will send the dashboard status to the parent frame, with a status of loading, running, done, or error.

Event Name: status

{
description: `Sends the dashboard status to the parent window.
The status can be one of the following:
- loading: the dashboard is still loading
- running: the dashboard is running queries
- done: the dashboard has finished loading
- error: the dashboard has encountered an error
`,
name: EmbedEventName.Status,
payload: { ...payload },
}

Post Messages

In addition to javascript events, users can send post messages from markdown or table visualizations. These can be observed by listeners in the parent frame to trigger certain actions, such as popping open custom drill modals or passing through certain data from Omni to the parent frame.

Table Visualizations

Within the table visualization, if a user clicks on the field level settings, then the display tab, and updates display as to link, then update URL to Embed Event. This will allow a user to give an embed event name, which will be triggered on a click to send a message out to the parent frame.

Markdown Visualizations

Using a tag for a custom element in markdown, we can send post messages from the iframe to the parent frame. This can be done upon a click to the corresponding aspect of the markdown visualization. To include it, you can include the following tag:

<omni-message event-name="product-image-click" event-data="{{products.name.raw}},{{products.retail_price.raw}},{{products.sku.raw}}">

Within this tag, you can set the event name, as well as the data that will be sent out to the parent frame.

Custom Theme Properties

Custom themes are currently only available for dashboards. There are two ways to create and use custom themes: directly on a dashboard or through the url.

Advanced If you intend to make the theme dynamic with some external logic then adjusting the url theme properties using the customTheme parameter is also available to use.

Page

Property NameDescriptionAccepts
dashboard-backgroundThe background of the embedded dashboard.background
dashboard-page-paddingThe padding of the embedded dashboard page.padding

Tiles

Property NameDescriptionAccepts
dashboard-tile-marginThe spacing around tile elements on the embedded dashboard.padding
dashboard-tile-backgroundThe background of the embedded dashboard's tiles.background
dashboard-tile-shadowThe box shadow of the embedded dashboard's tiles.box-shadow
dashboard-tile-text-body-colorThe text color of primary text in the embedded dashboard's tiles. Primary text refers to the tile title of most tiles or the single value tiles.color
dashboard-tile-text-secondary-colorThe text color of secondary text in the embedded dashboard's tiles.color
dashboard-tile-border-colorThe border color of the embedded dashboard's tiles.color
dashboard-tile-border-radiusThe border radius of the embedded dashboard's tiles.border-radius
dashboard-tile-border-styleThe border style of the embedded dashboard's tiles.border-style
dashboard-tile-border-widthThe border width of the embedded dashboard's tiles.border-width
dashboard-tile-title-font-sizeThe font size of the embedded dashboard tiles' titles.font-size
dashboard-tile-title-font-weightThe font weight of embedded dashboard tiles' titles.font-weight
dashboard-tile-title-text-colorThe text color of title text in the embedded dashboard's tiles.color
dashboard-tile-title-font-familyThe font family of title text in the embedded dashboard's tiles. Pass a link to a remote woff2 file to use a custom font.woff2 url
dashboard-tile-text-body-font-familyThe font family of the body text in the embedded dashboard's tiles. Pass a link to a remote woff2 file to use a custom font.woff2 url
dashboard-tile-text-code-font-familyThe font family of a markdown <code> element in the embedded dashboard's markdown tiles. Pass a link to a remote woff2 file for custom font usage.woff2 url

Controls

Page-level controls like filters, field swappers, and period-over-period.

Property NameDescriptionAccepts
dashboard-control-backgroundThe background of filter controls in the embedded dashboard.background
dashboard-control-radiusThe border radius of controls.border-radius
dashboard-control-border-colorThe border color of filter controls in the embedded dashboard.color
dashboard-control-text-colorThe text color of filter controls in the embedded dashboard.color
dashboard-control-placeholder-colorThe text color of placeholder text inside controls.color
dashboard-control-label-colorThe text color of labels above filter controls in the embedded dashboard.color
dashboard-control-outline-colorThe outline color for controls when they have focus.outline-color

Control popover

Styles applied to control popovers and the inputs inside of them.

Property NameDescriptionAccepts
dashboard-control-popover-backgroundThe background of filter control popovers in the embedded dashboard.background
dashboard-control-popover-text-colorThe base text color in control popovers.color
dashboard-control-popover-secondary-text-colorThe secondary text color in control popovers.color
dashboard-control-popover-link-colorThe color of links in control popovers.color
dashboard-control-popover-divider-colorThe color of dividers in control popovers.color
dashboard-control-popover-radiusThe border radius of control popovers.border-radius
dashboard-control-popover-border-colorThe border color of control popovers.color
dashboard-filter-input-backgroundThe background of filter inputs inside of the popover.background
dashboard-filter-input-radiusThe border radius of filter inputs inside the popover.border-radius
dashboard-filter-input-border-colorThe border color of filter inputs inside the popover.color
dashboard-filter-input-text-colorThe text color of filter inputs inside the popover in the embedded dashboard.color
dashboard-filter-input-placeholder-colorThe color of placeholder text inside filter inputs.color
dashboard-filter-input-icon-colorThe color of icons inside filter inputs.color
dashboard-filter-input-outline-colorThe outline color inputs when they have focus.outline-color
dashboard-filter-input-accent-colorThe color of checkbox, radio, and toggle inputs.color
dashboard-filter-input-accent-invert-colorThe invert color of elements in checkbox and radio inputs.color
dashboard-filter-input-token-colorThe background color of tokens in multi-select inputs.color
dashboard-filter-input-token-text-colorThe text color of tokens in multi-select inputs.color

Buttons

Property NameDescriptionAccepts
dashboard-key-colorThe key color of the embedded dashboard, used on filter Update buttons and other key elements.color
dashboard-key-text-colorThe key text color of the embedded dashboard, used on the text of filter Update buttons and other key elements.color
dashboard-button-radiusThe border radius of buttons in popover controls.border-radius
dashboard-button-transparent-text-colorThe text color of transparent buttons in filter control popovers.color
dashboard-button-transparent-interactive-colorThe background color of transparent buttons in filter control popovers when the user hovers over the button.color
dashboard-menu-item-interactive-colorThe background color of menu items in filter control popovers when the user hovers over it.color

Font family properties like dashboard-tile-title-font-family support links to a remote woff2 file. A typical use case is to link to a woff2 file from a Google Font. To grab the link to a Google Font woff2 file, perform the following steps:

  1. Go to fonts.google.com and click on your font of choice. For this example, we’ll be using the “Yarndings 12” font.
  1. That click should take you to a font specimen page. On that font specimen page, click the “Get font” button.
  1. After pressing “Get font” you’ll be taken to a selection page. On that selection page, click the “Get embed code” button.
  1. Go to the fonts.googleapis.com link that appears in the third <link> element of the example embed code. Note that some Google Fonts allow you to customize font weight and font style in the left panel so feel free to filter down to the exact font styling you’d like.
  1. Find the @font-face at-rule under labeled “latin” and copy the src property url(...).
  1. Pass that url(...) value into the appropriate customTheme property when generating your Omni SSO embed link.
  {
"dashboard-tile-title-font-family": "url(https://fonts.gstatic.com/s/yarndings12/v2/55xreyp2N8T5P2LJbZAlkY9s9pjNAWZEnA.woff2)",
}
  1. And voilà!

Deliveries

Embed users can leverage Omni’s delivery functionality to schedule or set alerts on documents. To disable this feature on an instance wide or a document level, follow the instructions in the corresponding pages.

Need to whitelabel delivery emails?

The Customer email sender feature allows you to customize the sender information for Omni delivery emails, including the sender's name, email domain, and reply-to address. Refer to the Email delivery guide for more information.

In order for email suggestions to be populated automatically for deliveries, the email parameter needs to be included in the embed URL.