Embed our widget

How to embed the plug and play embedded widget for Authentic Insurance partners.

Installation

Add the following script tag to the <head> of your index.html file.

<script type='module' src='https://www.unpkg.com/@authenticins/widget@latest/dist/authenticWidget.js'></script>

To view the source code go here: https://www.npmjs.com/package/@authenticins/widget?activeTab=readme

Usage

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).

<script>
  window.addEventListener('load', () => {
    window.authenticWidget.init({
      portal: { url: 'https://example-tenant-name.prod.authenticinsurance.com' },
      prefillData: {
        lead: { email: 'johndoe@email.com' }
      },
      themeOverrides: {
        primaryColor: '#000000',
        borderRadiusPx: 6,
        brand: {
          name: 'Example Tenant Name',
          logoUrls: {
            darkBg: 'https://example-tenant-website.com/logo-white.png',
            lightBg: 'https://example-tenant-website.com/logo-black.png'
          },
          faviconUrl: 'https://example-tenant-website.com/favicon.ico'
        }
      }
    });
  })
</script>

Note: We recommend adding UTM parameters to the widget (more information on UTMs can be found here). Partners can do this by adding the UTM parameters as normal onto the insurancePortal url in the widget script. An example would be:

Configuration

Last updated