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 instantiateMoneyDesktopWidgetLoader, you must pass in an object with at least the required URL parameter, and any of the following optional parameters.
Config Parameter
Theconfig 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 islaunch_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.
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:- Define multiple placeholder elements, each with a unique CSS
id. - In your JavaScript, create an instance of
MoneyDesktopWidgetLoaderfor each widget. - Connect each loader instance to a placeholder element by setting the
idproperty value as the CSSid.
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 settingautoload 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

