> 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/embeds-1.md).

# New Marketplaces

Implementation, Syntax, Consumer Experience, Tags, Tracking, and Best Practices

{% hint style="success" icon="person-waving" %}
This guide covers integrating Engine's **New Marketplaces Embed** into your website. Also called the **generic offers embed**, it supports smaller product subverticals **including Credit Builders, Earned Wage Access, and Debt Relief.**

Review the embed syntax and loading best practices. Address layout shift to optimize performance. Discuss specific implementation details with your Engine team.
{% endhint %}

## Standard Embed Implementation

{% 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/generic-offers/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.
* **Component Name:** `generic-offers` is the universal offers tile embed. It renders one or more cards from Engine’s Offer Catalog (any supported product type) using UUID + product type, and handles real-time availability, monetization rules, and fallback UX for you

  **Mounting:** manual is the default. Place where the marketplace should render. The script tag and the element can appear in either order on the page.

  * With `data-embed-type="auto-mount"`, do not add the element - the script inserts the component immediately after itself when the bundle loads. In this mode the script tag must be inside , in the exact position where the marketplace should appear.

## New Marketplaces Embed Demo

Credit Builder Embed Demo Link: [https://www.moneylion.com/network/cnbc-ml/credit-builders/iframe](#the-embed-code)

<figure><img src="https://3849802388-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MeMvVDbjd8vJWZ9Hwf0%2Fuploads%2FLf8QW8y3GYh7lmDkLM2A%2Fimage.png?alt=media&amp;token=a74a7c03-f93e-4f4e-a67c-e0ee6a4c2879" alt=""><figcaption><p>Credit Builder Embed</p></figcaption></figure>

## **Client Tags for Attribution**

Engine Embeds support the ability to add certain tags with varying use cases, which are outlined in this section.

#### How to Implement Client Tags

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

{% code overflow="wrap" %}

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

{% endcode %}

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

{% code overflow="wrap" %}

```html
"<script 
      async src=\"https://www.moneylion.dev/network/{channel}/{zone}/web-component/generic-offers/index.js\" 
      data-tags=\"tag.clientId=c1&tag.source=email\"
      data-embed-type=\"auto-mount\" 
></script>"
```

{% endcode %}

<mark style="color:$primary;">In the above example,</mark> <mark style="color:$primary;">`clientId`</mark> <mark style="color:$primary;">and</mark> <mark style="color:$primary;">`source`</mark> <mark style="color:$primary;">are available as tags for reporting purposes.</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.

## Embed Best Practices & Troubleshooting

{% 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.
   * Auto-mount snippet: Confirm data-embed-type="auto-mount" is on the tag.
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/embeds-1.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.
