> For the complete documentation index, see [llms.txt](https://even-financial.gitbook.io/developer-center/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://even-financial.gitbook.io/developer-center/marketplace-integrations/web-embeds/auto-insurance-marketplace.md).

# Auto Insurance Marketplace

Auto Insurance Embed: Implementation, Syntax, Demo, Tags, and Best Practices

{% hint style="success" icon="person-waving" %}
This page outlines what's needed to integrate Engine's **Auto Insurance Embed** into your website. In this guide, we will explore what Engine’s Embed syntax looks like and best practices for loading it on your site. This includes topics like proactively addressing layout shift for optimized performance.

This is a high-level guide, and specific implementation details should be discussed with your Engine team.
{% endhint %}

## Auto Insurance Embed Experience

Engine's auto insurance embed drops a short-form marketplace widget into your page so customers can compare carrier offers without leaving your site. Engine handles carrier connectivity, geo/state eligibility, lead routing, and monetization behind the scenes.

### Results Page User Experience

After a customer completes the short-form search, they see a personalized results view with ranked offer cards, savings messaging, and profile controls (zip, age, vehicles, current provider, homeowner status, and more). Customers can refine their profile and click through to carrier quotes without restarting the funnel.

<figure><img src="https://3849802388-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MeMvVDbjd8vJWZ9Hwf0%2Fuploads%2FVVwChGiavipWpJKmtbo3%2Fimage.png?alt=media&amp;token=747bf442-61cc-4733-b4c3-efffb087c52c" alt=""><figcaption></figcaption></figure>

### Embed Full Funnel Demo

Opens the standalone auto insurance funnel in a new tab so you can preview the full intake-to-results journey end to end. Use it to validate UX, copy, and carrier presentation alongside your embedded short-form widget.

{% embed url="<https://www.moneylion.com/network/sweta-test-auto/auto-insurance/search>" %}

## Standard Embed Implementation

Engine's embed code can be placed in any order within your page, but for optimal user experience we recommend placing the `script` tag within the same div where the content is being rendered.

### **Basic Embed Syntax**

{% hint style="info" icon="triangle-exclamation" %}
**PLEASE NOTE**: Your Engine representative will provide you with your specific code snippet. Do not try to reproduce from the sample snippet outlined below.
{% endhint %}

{% code overflow="wrap" %}

```html
<script
  async
  src="https://www.moneylion.com/network/{channel}/{zone}/web-component/auto-insurance/index.js"
  data-embed-type="auto-mount"
></script>
```

{% endcode %}

This is a representative example of what our embed code looks like, and contains placeholders as defined below. Placeholders and will be replaced with precise values in the embed code provided to you.

### **Embed Components**

* **Channel & Zone:** placeholders that will be replaced with precise values in the embed code provided to you by your Engine representative.
* **HTML Attributes**: optional `data-*` attributes on the script tag that configure embed behavior and are passed to the mounted component at runtime.
  * **data-embed-type**: used for mounting and required on the script tag; set to `auto-mount` so the widget is automatically inserted beside the script when the bundle loads.
  * **data-query:** Enables data prefill functionality and defintes what field should be prepopulated (see Prepopulating User Data below).

## **Client Tags & Prepopulating User Data**

Engine's Auto Insurance Marketplace embed supports appending client tags for channel partner reporting. This marketplace works slightly differently than other Engine embeds when it comes to pre-population of customer data. This is because Auto Insurance has its own prefill schema layered on top of our embeds.

Including these tags is completely optional, but enables functionality that has **significant downstream benefits**. From an implementation perspective for each use case:

* **Pre-populating Customer Data for certain non-PII fields**
  * `data-query`: Decreases friction in the user experience and increases application submission rates
* **Channel Partner Reporting**
  * `data-tags` : enables more robust reporting

### How to Implement Tags & Customer Data Prefill

To **add client tags** in an embed, use the following syntax in the `data-tags` attribute within the embed script:

```
tag.key_1=value_1&tag.key_2=value_2
```

To **pre-populate fields** in an embed, use the following syntax in the `data-query` attribute within the embed script:

```
app.key_1=value_1&app.key_2=value_2
```

### Sample Implementation

```html
<script 
      async src="https://www.moneylion.com/network/{channel}/{zone}/web-component/auto-insurnace/index.js"
      data-tags="tag.clientId=c1&tag.source=email"
      data-query="app.providedCreditRating=fair&app.zipcode=90210"
      data-embed-type="auto-mount"
></script>
```

<mark style="color:$primary;">In the above example, "clientId" and "source" are available as tags for reporting purposes and "providedCreditRating" and "zipcode" will be prepopulated in the embed user interface.</mark>

#### Supported Client Tag Keys

Below are the client tag keys that are currently supported. See [Attribution Tracking](/developer-center/channel-partner-reporting/attribution-tracking.md) for more information.&#x20;

{% columns %}
{% column %}
**Most common**

* `tag.clientId`
* `tag.subId`
* `tag.subId1`
* `tag.subId2`
* `tag.campaignId`
  {% endcolumn %}

{% column %}
**Also supported**

* `tag.agentId`
* `tag.clickId`
* `tag.deviceId`
* `tag.medium`
* `tag.sourceId`
* `tag.subId3`
* `tag.target`
* `tag.trafficsource`
* `tag.userId`
  {% endcolumn %}
  {% endcolumns %}

{% hint style="danger" %}
**Client tag keys are case-sensitive.** `subid` and `subId` are separate reporting keys.
{% endhint %}

If a different key is needed, please reach out to your Partner Manager - we *may* be able to accommodate, but adding nonstandard keys will increase the time it takes Engine to report Client Tag values back to you and is therefore not recommended.

#### Supported Tag Keys for Prefill <a href="#integration-with-html" id="integration-with-html"></a>

Engine's Auto Insurance marketplace accepts the following parameters and values for customer data pre-population purposes:

| Field                                                                                                                                                                                                                                                    | Parameter                   | Acceptable Values                                                                                                                                                                                        |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Date of Birth                                                                                                                                                                                                                                            | `app.dateOfBirth`           | Date string of the format YYYY-MM-DD                                                                                                                                                                     |
| Zip Code                                                                                                                                                                                                                                                 | `app.zipcode`               | US 5-digit numeric ZIP code, e.g. `10001`. No leading/trailing whitespace                                                                                                                                |
| Number of Vehicles                                                                                                                                                                                                                                       | `app.numberOfVehicles`      | Integer between 1 and 5                                                                                                                                                                                  |
| Current Issuer                                                                                                                                                                                                                                           | `app.currentIssuer`         | String issuer name matching the enum values from Engine's API Reference for the Schema `AutoInsuranceIssuer`                                                                                             |
| Military Status                                                                                                                                                                                                                                          | `app.is_military`           | Boolean (`true`/`false`)                                                                                                                                                                                 |
| Home Owner Status                                                                                                                                                                                                                                        | `app.is_home_owner`         | Boolean (`true`/`false`)                                                                                                                                                                                 |
| <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>The fields defined below are only used for Engine's legacy Auto Insurance experience (likely anything integrated prior to August 2026).</strong></p></div> |                             |                                                                                                                                                                                                          |
| Age Range                                                                                                                                                                                                                                                | `app.ageRange`              | <ul><li>AGE\_RANGE\_18\_20</li><li>AGE\_RANGE\_21\_24</li><li>AGE\_RANGE\_25\_34</li><li>AGE\_RANGE\_35\_44</li><li>AGE\_RANGE\_45\_54</li><li>AGE\_RANGE\_55\_64</li><li>AGE\_RANGE\_65\_PLUS</li></ul> |
| Multiple Vehicle Status                                                                                                                                                                                                                                  | `app.has_multiple_vehicles` | `true`                                                                                                                                                                                                   |
| Insured Status                                                                                                                                                                                                                                           | `app.is_currently_insured`  | `true`                                                                                                                                                                                                   |

## Embed Best Practices & Troubleshooting <a href="#integration-with-html" id="integration-with-html"></a>

{% hint style="success" %}

#### Best practices

1. **Use the snippet Engine gives you.** Don't hardcode channel, zone, or component paths yourself.
2. **Keep `async` on the script tag.** This prevents the embed script from blocking the rest of your page.
3. **Give the embed a real container.** Set a width on the parent. Set a `min-height` when possible. This gives the iframe room to render and avoids large layout shifts.
4. **Allow Engine in your CSP.** Your Content Security Policy must allow the Engine script in `script-src` and `https://www.moneylion.com` (or your Engine environment host) in `frame-src`.
5. **Follow this page's tags and prefill guidance.** Attributes differ by product. Use this page's sample, or your Engine-provided snippet, rather than copying syntax from another embed.
   {% endhint %}

{% hint style="warning" %}

#### Troubleshooting

**The component doesn't show**

1. Check your install mode:
   * **Explicit custom element:** Confirm the `moneylion-*` element from your snippet is on the page.
2. Open the browser console. Check for script load failures or CSP blocks.

**The page feels slow**

1. Confirm the `async` attribute is on the `<script>` tag.
2. Avoid nesting the embed in a hidden container, such as `display: none`, at first load. This can delay useful height and layout work.

**Events aren't firing**

1. Confirm you listen for `message` events. Check for `{ name, payload }` objects. See the tracking section on this page for product-specific events.
2. In production, filter by Engine's origin. This ignores unrelated `postMessage` traffic from other page scripts.
   {% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://even-financial.gitbook.io/developer-center/marketplace-integrations/web-embeds/auto-insurance-marketplace.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
