Mortgage Marketplace
Implementation, Syntax, Consumer Experience, Tags, Tracking, and Best Practices
This page outlines what's needed to integrate Engine's Mortgage 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.
Engine embeds run the same backend Mortgage application as our Hosted Partner Page do, but as opposed to linking out to a MoneyLion-hosted page they can be embedded directly into you property for a more native experience.
The Mortgage Experience
Engine's Mortgage embed covers purchase, refinance, and home equity (HELOC and HELOAN). The embed renders three surfaces, and your zone configuration decides which one the consumer lands on first:
Explore. A rate-trend chart built on current APR data. It shows how rates have moved rather than listing offers, so a consumer can arrive with no information and still see something useful. Its call-to-action hands off to Search.
Search. The question flow that qualifies the consumer and ends by creating an offer search with Engine's lending partners.
Compare. The results page for that offer search. The consumer can sort the offers, page through them, and narrow them with filters, and each offer's call-to-action sends the consumer to that lender. Compare is the last Engine screen in the flow.
Your Engine representative will set the entrypoint per zone to either Explore or Search. Compare is not available as an entrypoint, because the page is scoped to the offer search that Search created - the only way to reach it is to complete the question flow.
Which filters appear on Compare depends on the mortgage type. Purchase and refinance offers can be narrowed by loan term and by FHA and VA program eligibility. Home equity offers can be narrowed by property value, current mortgage balance, and requested loan amount.
The Search Funnel
Mortgage asks a different opening question than Engine's other marketplaces: the consumer states a goal - buying a home, refinancing, or borrowing against home equity - and that answer changes which questions follow.
Mortgage Information
Purchase: goal, plus purchase price and down payment
Refinance: property value and current mortgage balance
Home Equity: property value, current mortgage balance, and desired loan amount
Zip Code
The property's ZIP code
Cash Out
Refinance only. Whether the consumer wants cash out, or a rate-and-term refinance
Credit Score
Self-reported credit score range
Identity Verification
Date of birth and phone number
Contact Information
First name, last name, and email
Personal Information
Mailing address
SSN and Consents
Social Security Number, with FCRA and TCPA consent
Not every consumer may see every step. When Engine already has consumer data because identity verification returned i, the marketplace routes past those steps instead of asking again. Identity verification may also insert an SMS one-time-passcode step.
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.
Embed Components
Channel & Zone: placeholders that will be replaced with precise values in the embed code provided to you.
Component Name: corresponds to the specific product or Engine experience type that's being rendered.
Mortgage is served from
/web-component/mortgage/: the full Mortgage marketplace - Explore, Search, and Compare, across purchase, refinance, and home equity. Mortgage ships a single component rather than one per surface. It always opens the app root, and Engine's zone configuration decides whether the consumer starts on Explore or Search, so there is noexperienceattribute to set.
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.
Basic Syntax
This is a representative example of what our embed code looks like, and placeholders will be replaced with precise values in the embed code provided to you:
Customization & Auto Sizing
The web component loads an iFrame and will automatically fill the container. Embeds are rendered wherever you include our HTML tag on your page and will responsively scale to fill the space available to it. The embedded app reports its own height to your page as the consumer moves through the flow, so the iFrame grows and shrinks with the content.
Required Consumer Data Inputs
The Mortgage experience collects every field below itself, inside the Search funnel. Fields appear in the order the consumer meets them, matching the Search Funnel above.
A consumer is only asked for the fields belonging to the mortgage type they picked, and any step Engine can already satisfy - through identity verification - is skipped rather than asked again.
Mortgage Type
mortgageType
What the consumer wants to do. Values: purchase, refinance, heloc. Home equity submits heloc and leaves the lead's mortgageType unset.
All Mortgage Product Types
Purchase Price
purchasePrice
Purchase price of the home. Stored on the lead as propertyValue.
Purchase only
Down Payment
downPayment
Cash down payment, in dollars. Stored on the lead as downPaymentAmount.
Purchase only
Down Payment Percentage
downPaymentPercent
The same down payment expressed as a percentage of purchase price. Used by the form only; not stored on the lead.
Purchase only
Property Value
propertyValue
Current estimated value of the home.
Refinance and Home Equity
Current Mortgage Balance
loanBalance (refinance)
mortgageBalance (home equity)
Outstanding balance on the existing mortgage. Stored on the lead as mortgageBalance in both cases.
Refinance and Home Equity
Desired Loan Amount
desiredLoanAmount
Amount the consumer wants to borrow against their equity. Stored on the lead as mortgageAmount.
Home Equity only
Property ZIP Code
zipcode
ZIP code of the property being financed, collected on the Zip Code step. Distinct from the consumer's mailing ZIP. Stored on the lead as propertyZipcode, and Engine derives propertyState from it.
All Mortgage Product Types
Cash Out
cashOut
Whether the consumer wants cash out or a rate-and-term refinance. Values: yes, no. Stored on the lead as refinanceType (cash_out or rate_term).
Refinance only
Credit Score
creditScoreRange
Self-reported credit score range. Stored on the lead as mortechCreditRating. Engine always runs a soft pull.
All Mortgage Product Types
Date of Birth
dateOfBirth
Consumer's date of birth. Stored on the lead as YYYY-MM-DD.
All Mortgage Product Types
Phone Number
phoneNumber
Primary phone number. Stored on the lead as primaryPhone.
All Mortgage Product Types
First Name
firstName
Legal first name.
All mortgage types
Last Name
lastName
Legal last name.
All mortgage types
Email Address
email
Email address.
All mortgage types
Street Address
address1
Mailing street address.
All mortgage types
Address Line 2
address2
Apartment, unit, or suite.
Optional
City
city
Mailing city.
All Mortgage Product Types
State
state
Mailing state.
All Mortgage Product Types
Mailing ZIP Code
zipcode
The consumer's mailing ZIP code, collected on the Personal Information step. May differ from the property ZIP.
All Mortgage Product Types
Social Security Number
ssn
Collected and stored in the form NNN-NN-NNNN.
All Mortgage Product Types
Client Tags for Reporting & Attribution
Client tags are appended to the Mortgage marketplace URL, and the Mortgage web component does not currently accept a tags attribute the way some other Engine embeds do. Do not copy the tags or data-tags syntax from another product's embed page - confirm client tag attribution for your Mortgage embed with your Engine team.
Client tags let Engine attribute leads and offer clicks back to your own reporting. Where they are supported, the syntax is a tag. prefix on each key:
Client tags carried on the Mortgage marketplace URL are attached to the offer search Engine creates for that consumer, which is what makes them available in your reporting. For a URL-based integration, see Client Tags on the Hosted Partner Page.
Supported Client Tag Keys
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.
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.
Tracking Events Emitted by Embed
When you embed the Mortgage experience, event callbacks fire by default. There is no attribute, flag, or opt-in to enable them.
How It Works
As a consumer navigates through the experience, the embed emits partner messages: JSON objects with a name (the event type) and a payload (event-specific data). The iFrame posts them to your host page with postMessage.
You do not register callbacks with Engine. You listen on your host page; messages arrive whether or not you handle them.
Not every UI action sends a message. Only the events listed below are part of the partner contract. Other activity - offers rendering, offer detail views, and the embed scrolling into view - is used internally and is not posted to your page.
Messages are one-way. There is no acknowledgement or response channel.
Implementation Path
Partners using Web Embed receive events by listening for browser message events on the host page:
The message shape is always:
Every payload includes timestamp, an ISO-8601 string.
Events & Data
onUpdate: Emitted when the consumer submits a question in the flow. updatePage is the step slug from the question flow table above, so this is the event to use for funnel and drop-off reporting.
onOfferClick: Emitted when the consumer clicks an offer call-to-action. placement distinguishes where the click happened: offer-card for the button on the offer card itself, and more-info-modal for the call-to-action inside the offer's More Info dialog.
onBrandLoaded: Emitted when the embedded app has resolved your brand styling. If you use Engine's <moneylion-mortgage> component, you can ignore this event - the component applies the styling for you. It is relevant only if you host the iFrame directly.
onOpenModal: Emitted when the consumer opens an offer's More Info dialog, carrying the content to display. As with onBrandLoaded, Engine's component renders this dialog for you; the event matters only for a direct iFrame integration.
Embed Best Practices & Troubleshooting
Best practices
Use the snippet Engine gives you. Don't hardcode channel, zone, or component paths yourself.
Keep
asyncon the script tag. This prevents the embed script from blocking the rest of your page.Give the embed a real container. Set a width on the parent. Set a
min-heightwhen possible. This gives the iFrame room to render and avoids large layout shifts.Allow Engine in your CSP. Your Content Security Policy must allow the Engine script in
script-srcandhttps://www.moneylion.com(or your Engine environment host) inframe-src.Follow this page's tags guidance. Attributes differ by product. Use this page's sample, or your Engine-provided snippet, rather than copying syntax from another embed.
Troubleshooting
The component doesn't show
Check your install mode. Custom element: confirm the
moneylion-mortgageelement from your snippet is on the page. Auto-mount: confirmdata-embed-type="auto-mount"is on the script tag and the script is inside<body>.Open the browser console. Check for script load failures or CSP blocks.
The page feels slow
Confirm the
asyncattribute is on the script tag.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
Confirm you listen for
messageevents. Check for{ name, payload }objects. See the tracking section on this page for the events Mortgage actually emits.In production, filter by Engine's origin. This ignores unrelated
postMessagetraffic from other page scripts.
Last updated
Was this helpful?

