Quick Start

Go from zero to live insurance quotes in five steps.

1. Get your widget key

Your BenefitHub account representative will provide a widget key. This key identifies your organization and determines which quote types (auto, home) are enabled.

YOUR_WIDGET_KEY=wk_abc123def456

2. Add the embed snippet

The fastest way to embed the widget is with a single script tag. Add it to any page where you want insurance quotes:

<div id="bh-insurance-widget"></div>
<script
  src="https://cdn.benefithub.com/widget/v1/widget.js"
  data-bh-key="YOUR_WIDGET_KEY"
  data-bh-type="auto"
  data-bh-container="#bh-insurance-widget"
  data-bh-base-url="https://widget.benefithub.insure"
></script>

Change data-bh-type to "home" for home insurance quotes.

3. Customize appearance

Add theme attributes to match your brand colors. See the Theming page for a full interactive builder.

<script
  src="https://cdn.benefithub.com/widget/v1/widget.js"
  data-bh-key="YOUR_WIDGET_KEY"
  data-bh-type="auto"
  data-bh-container="#bh-insurance-widget"
  data-bh-base-url="https://widget.benefithub.insure"
  data-bh-color-primary="#1a365d"
  data-bh-color-btn="#2563eb"
  data-bh-color-btn-text="#ffffff"
  data-bh-border-radius="12px"
></script>

4. Register your domain

Before the widget works on your website, your domain must be registered with BenefitHub. This is a security measure that prevents unauthorized use of your widget key.

Contact your BenefitHub account manager with your production domain(s), for example:

  • https://www.yoursite.com
  • https://yoursite.com
  • *.yoursite.com (wildcard — covers all subdomains)

localhost is pre-approved for test keys, so you can develop locally without registration.

5. Test in UAT

Before going live, test against the UAT environment. Note that UAT uses a different CDN and base URL:

<!-- UAT environment -->
<script
  src="https://cdn.benefithub.info/widget/v1/widget.js"
  data-bh-key="YOUR_UAT_KEY"
  data-bh-type="auto"
  data-bh-container="#bh-insurance-widget"
  data-bh-base-url="https://insurance-widget-uat-us.azurewebsites.net"
></script>

UAT uses test carriers that return mock quotes, so you can verify the full flow without incurring real quote charges.

Environment URLs

EnvironmentCDN (script src)Base URL (data-bh-base-url)
Productionhttps://cdn.benefithub.com/widget/v1/widget.jshttps://widget.benefithub.insure
UAThttps://cdn.benefithub.info/widget/v1/widget.jshttps://insurance-widget-uat-us.azurewebsites.net

6. Go live

Once you have verified the widget in UAT, swap in your production widget key and the production script URL:

<!-- Production environment -->
<script
  src="https://cdn.benefithub.com/widget/v1/widget.js"
  data-bh-key="YOUR_PRODUCTION_KEY"
  data-bh-type="auto"
  data-bh-container="#bh-insurance-widget"
  data-bh-base-url="https://widget.benefithub.insure"
></script>

Prefilling user data

If you already know the user's information, you can prefill form fields to skip steps and improve conversion:

<script
  src="https://cdn.benefithub.com/widget/v1/widget.js"
  data-bh-key="YOUR_WIDGET_KEY"
  data-bh-type="auto"
  data-bh-container="#bh-insurance-widget"
  data-bh-base-url="https://widget.benefithub.insure"
  data-bh-prefill-firstname="Jane"
  data-bh-prefill-lastname="Doe"
  data-bh-prefill-email="jane@example.com"
  data-bh-prefill-zip="90210"
></script>

Agent tracking

Pass a vendor/agent ID to attribute quotes back to a specific agent or campaign:

<script
  src="https://cdn.benefithub.com/widget/v1/widget.js"
  data-bh-key="YOUR_WIDGET_KEY"
  data-bh-type="auto"
  data-bh-container="#bh-insurance-widget"
  data-bh-base-url="https://widget.benefithub.insure"
  data-bh-agent-id="agent_12345"
></script>

When using the SDK programmatically, pass agentId as a top-level config property in BHWidget.init(). See the SDK Reference for details.

Server-managed settings

Some widget settings are managed by BenefitHub on your behalf and stored in our database. These cannot be set via embed attributes — contact your account manager to configure them.

SettingDefaultDescription
Benefit Badge TextExclusive Member BenefitsText shown in the trust badge on the landing page. Set custom text (up to 200 characters) or empty to hide the badge entirely. Plain text only — HTML is stripped automatically.
Logo URLBenefitHub logoYour organization's logo displayed in the widget. Must be an HTTPS URL.
Allowed OriginsNoneDomains where the widget is authorized to load. Must be configured before the widget works on your site. Supports wildcard patterns.

Note: Embed-level style attributes (colors, fonts, logo) take priority over server-managed defaults. This allows agents to override vendor branding while keeping settings like benefit text consistent.

Next steps