Once installed, the widget script will expose controls to the browser window. You can configure the widget's look and behavior on initialization (see the full WidgetConfig definition below).
interface WidgetConfig {
insurancePortal?: {
url?: string;
// The CSS selector for the target element you want the Insurance Portal injected into.
// If no target selector is provided, the widget will inject its default persistent banner and modal.
targetSelector?: string;
};
customerId?: string;
prefillData?: {
lead?: {
email:? string;
businessClassCode?: string;
stateCodes?: string[];
productIds?: string[];
};
responses?: {
exposures?: Array<{
exposureName: string;
// Where each key is a field's name mapped to its value (e.g. ['BUSINESS_LEGAL_NAME']: 'Example Business Name');
fieldValues: Record<string, string>;
}>;
// Same as format described above.
questions?: Record<string, string>;
};
};
themeOverrides?: {
useDarkMode?: boolean;
primaryColor?: string;
secondaryColor?: string;
borderRadiusPx?: number;
brand?: {
name?: string;
logoUrls?: {
darkBg?: string;
lightBg?: string;
};
faviconUrl?: string;
};
};
};
Note: We recommend adding UTM parameters to the widget (more information on UTMs can be found ). Partners can do this by adding the UTM parameters as normal onto the insurancePortal url in the widget script. An example would be: