Overview
Embeds support two types of customization: pre-filling data to reduce user friction, and styling to match your brand. For example, if you run a property listing website you can pre-fill the property price so the mortgage calculator loads with the right value already set — no manual input required.Pre-filling data
Use our predefined data attributes directly in the embeddiv to pass values in. Set them using your CMS or templating language.
Static values
Dynamic values
Multi-widget embeds
Perch supports both single and multi-widget embeds. Multi-widget embeds include a navigation bar to help users navigate between different calculators.Variables are global
Data attributes are applied globally across all widgets in the embed, which means:- Set them once on the embed code
- All widgets contained in the embed will receive the provided variables
- User-inputted values (e.g. income, down payment amount) are cached
- If the user loads the same calculator again or on another page, the embed will remember their values
Supported variables
Each widget has its own set of supported variables based on functionality. Here are the current supported global variables:Financial data
| Variable | Type | Description |
|---|---|---|
widget-property-value | Number | Property purchase price or current value |
widget-property-type | String | Type of property: Detached, Condo/Apartment, Townhouse, Semi-Detached, or Other |
widget-annual-property-taxes | Number | Annual property tax amount |
widget-monthly-maintenance-fee | Number | Monthly maintenance or HOA fees |
widget-down-payment | Number | Down payment amount in dollars |
widget-down-payment-percent | Number | Down payment as a percentage |
widget-annual-income | Number | Annual household income |
widget-referral-code | String | Partner referral code for lead attribution |
widget-advisor-profile-id | String | Specific advisor profile ID for attribution |
Styling options
| Variable | Type | Description |
|---|---|---|
widget-primary-color | String (hex) | Primary brand color (e.g., “#327766”) |
widget-secondary-color | String (hex) | Secondary accent color |
widget-hide-titles | Boolean | Whether to hide widget titles |
Localization
| Variable | Type | Description |
|---|---|---|
widget-locale | String | Language/locale code (e.g., “en”, “fr”) |
UTM tracking parameters
| Variable | Type | Description |
|---|---|---|
widget-utm-id | String | Unique identifier for the embed instance |
widget-utm-campaign | String | Campaign name for tracking |
widget-utm-medium | String | Marketing medium (defaults to “embed”) |
widget-utm-source | String | Traffic source identifier |
Examples
Property listing
Custom branding
CMS integration
Best practices
- Pre-fill as many relevant values as possible to reduce friction
- Ensure pre-filled values make sense in context — a property price should match the listing it appears alongside
- Use your referral code to ensure leads are properly attributed
- Match your brand colors and test on both light and dark backgrounds
- Use
widget-hide-titlesif widget headings conflict with your page layout