> 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

{% 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 %}

## Standard Embed Implementation

## Auto Insurance Specific Syntax

#### Component Name

* **auto-insurance-listing:** marketplace widget that drops a geo-aware, scrollable list of auto insurance offers into your page (e.g., blog or product flow) with Engine handling carrier connectivity, geo/state eligibility, and monetization behind the scenes.

#### HTML Attributes

**data-prefetch:** Enable prefetching and pre-filling of offers

* **Acceptable Values**: true, false

**data-query:** Defines fields to prefill in the embed experience

* **Acceptable Values:** Text Field

## Auto Insurance Embed Demo

<figure><img src="/files/N8vHYiCUEmAZPSorJF0B" alt=""><figcaption></figcaption></figure>

## **Client Tags & Pre-populating Customer 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
```

#### <mark style="color:$primary;">Sample Implementation</mark>

```html
<script 
      async src="https://www.moneylion.dev/network/{channel}/{zone}/web-component/auto-insurnace-listing/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

{% hint style="warning" %}
**Client tag keys are matched exactly, including case.** For example - `subid` and `subId` are stored as separate tags and will appear as separate keys in your reporting.

**Please send each key with consistent casing across all requests, and use the exact spelling shown above.**
{% endhint %}

Below are the client tag keys that are currently supported:

* agentId
* campaignId
* clickId
* clientId
* deviceId
* medium
* sourceId
* subId
* subId1
* subId2
* subId3
* target
* trafficsource
* userId

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                                                                                                                                |
| Credit Rating                                                                    | `app.providedCreditRating`  | <ul><li>excellent</li><li>good</li><li>fair</li><li>poor</li><li>limited</li><li>unknown</li></ul>                                                                                                       |
| 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`                                                                                             |
| Age Range (legacy)                                                               | `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> |
| **Only insert these values if they are applicable, and set the query to `true`** |                             |                                                                                                                                                                                                          |
| Military Status                                                                  | `app.is_military`           | true                                                                                                                                                                                                     |
| Home Owner Status                                                                | `app.is_home_owner`         | true                                                                                                                                                                                                     |
| Multiple Vehicle Status (legacy)                                                 | `app.has_multiple_vehicles` | true                                                                                                                                                                                                     |
| Insured Status (legacy)                                                          | `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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
