Skip to main content
This guide covers the configuration settings that are available to you if you integrated your Insights Widget onto a website using the Widget Loader.
The Widget Loader is no longer the recommended method of integrating the Insights Widgets onto a website. To learn about the recommended method, refer to Integrating Insights Widgets.

Widget Loader Parameters

When you instantiate MoneyDesktopWidgetLoader, you must pass in an object with at least the required URL parameter, and any of the following optional parameters.

Config Parameter

The config object, as shown in the following examples, contains configuration options.
Insights configuration options
Mini Widget configuration options
Micro Widget configuration options

Deep Linking Parameter

The only option for deep linking is launch_integration, and the only available value is direct-deposit. This field is passed as a string. This enables the widget to deep link to a specific integration. If account_guids are provided under deep_link_params, the direct-deposit session is initiated with those accounts as potential deposit destinations.

Create a Loading Message

Any HTML placed inside of the widget placeholder element is replaced once the widget iFrame has loaded. This means you can use the placeholder element’s inner HTML to display a loading message. Since this is HTML, it can be text, images, or anything you want. The following example adds some loading text that appears when the widget loads.
Example

Keeping a Session Alive and Logging Out

MX provides two important functions for the widget loader: ping and logout. The ping function resets the session timer, allowing you to keep the session open as long as needed. The default timeout period is 900 seconds, and it can be used anywhere in that period to restart the timer. A custom timeout period can be set by contacting MX, but MX recommends using the ping method rather than setting a longer timeout.
The logout function ends the session and redirects to the session timeout URL defined in your client profile. If no URL is defined, there is no redirect. Contact MX if you wish to set a specific session timeout URL.

Loading Multiple Widgets

To load multiple widgets on a single page:
  1. Define multiple placeholder elements, each with a unique CSS id.
  2. In your JavaScript, create an instance of MoneyDesktopWidgetLoader for each widget.
  3. Connect each loader instance to a placeholder element by setting the id property value as the CSS id.
After the page has loaded, all widgets load in their respective elements. Here’s an example of loading three separate widgets onto a single page:
Example

Loading Widgets at Different Times

By default, widgets load automatically once the web page has loaded. If you’d like to load your widgets manually you can use the autoload option by setting autoload to false when instantiating MoneyDesktopWidgetLoader. When you’re ready to load a widget, call the load method on the instance of MoneyDesktopWidgetLoader with the URL. Here’s an example of loading the Accounts Widget on page load, then loading the Transactions Widget when a button is selected:
Example