In short:
Your finance calculator is a copy-and-paste block for most websites, and a script embed with product detection and mobile handling if you have a developer. Both take under ten minutes.
The EasyAsset finance calculator sits on your website and lets a buyer work out repayments on the spot, then send you an enquiry without leaving the page. This guide covers both ways to install it.
Part 1 is for anyone who runs their own website. It is copy and paste, and you do not need a developer.
Part 2 is for developers, and covers how the embed works, how the product name fills itself in, and what happens on a phone.
If you already have the widget on your site, it keeps working and there is nothing you have to change.
Part 1: Adding the widget to your website
Step 1. Copy your code
Sign in to the Partner Portal and open Website Widget.
Enter your website address the first time you visit. Just the address is fine, so yourbusiness.com.au works and you do not need to type https:// in front of it. Pick your background and button colours, and the preview underneath updates as you choose. These are live settings: when you save them, the widget already on your website picks them up the next time someone opens the page, so you do not need to copy the code again or ask anyone to edit your site.
Then press Copy embed code. That gives you two lines that look like this:
<div class="ea-finance-widget" data-src="https://www.easyasset.com.au/finance-calculator-widget.html?apiKey=your-key"></div>
<script src="https://www.easyasset.com.au/js/ea-finance-widget.js" async></script>The code holds your own key, so paste it as it comes rather than retyping it.
Step 2. Paste it on your website
Put it wherever you want the calculator to appear. A product page works best, and so does a finance page or a sidebar.
Where you paste it depends on what your website is built with:
Platform | Where the code goes |
|---|---|
WordPress | Edit the page, add a Custom HTML block, paste both lines in |
Shopify | Edit the template or page, add a Custom Liquid section |
Wix | Add → Embed Code → Embed HTML, then paste and set the box height to about 600 pixels |
Squarespace | Add a Code block and paste both lines in |
A site your developer built | Send them Part 2 of this guide |
Save the page and open it. The calculator should be there.
What your customers see
A buyer moves the sliders to the amount, rate and term they want, and sees the weekly repayment update as they go. When they press Get a quote, a form opens over your page with their figures already attached.
They fill in their name, contact details and a short message, and it comes through as a finance enquiry. Their credit score is not affected by using the calculator.
If your website will not let you add a script
Some website builders on their cheaper plans block script tags. You can still use the widget. The link in the Partner Portal is the widget itself, so you can paste it straight into an iframe instead.
It shows the same calculator. What you give up is the part that makes the enquiry form open across the whole page, the automatic sizing on phones, and the product name filling itself in. Part 2 explains why.
Part 2: For developers
What the two embeds actually are
The widget is an iframe served from easyasset.com.au. You can either drop that iframe in yourself, or let a small loader script place it for you.
The reason the loader exists is a hard browser limit rather than a preference. An iframe cannot paint or measure outside its own rectangle. So with a bare iframe, the enquiry form can only ever open inside the widget box, the height has to be a number you guess in advance, and the widget has no way to read the page it is sitting on. The loader runs on your page, outside the iframe, where those limits do not apply.
Plain iframe | Loader script | |
|---|---|---|
Calculator | Yes | Yes |
Enquiry form | Opens inside the widget box | Opens across the page, over your header and cookie bar, with the page blurred behind |
Height | Fixed, whatever you set | Matches its content, and follows it on resize |
Product name | Blank, or a query parameter you add per page | Read from the page automatically |
Install | One iframe tag | One div and one script tag |
Installing the loader
Place the container where the widget should appear, and the script once anywhere on the page.
<div class="ea-finance-widget"
data-src="https://www.easyasset.com.au/finance-calculator-widget.html?apiKey=your-key"></div>
<script src="https://www.easyasset.com.au/js/ea-finance-widget.js" async></script>data-src is the embed link from the Partner Portal, used exactly as it comes. It already carries the API key, the theme colours and the logo, so the script never rebuilds any of that and you have nothing to keep in sync.
The script is safe to load once for any number of widgets. It scans for every element with the class on load, and ignores a second copy of itself.
Filling in the product name
On a product page the enquiry form should name the machine. Asking the buyer to type it adds friction and usually produces a vaguer lead. The loader reads it off the page instead, taking the first of these it finds:
A
data-productattribute on the container, if you set oneschema.org Product structured data, read from any JSON-LD block on the page, including one wrapped in an @graph
The
og:titlemeta tagThe first
h1on the page
JSON-LD is the one worth relying on. It is the structured data you already publish for Google, so it is usually present, and it names the product rather than the page.
When none of them find anything, which is the correct outcome on a homepage or a category page, the field is left empty for the buyer to fill in.
To set it yourself:
<div class="ea-finance-widget"
data-src="https://www.easyasset.com.au/finance-calculator-widget.html?apiKey=your-key"
data-product="2021 Toyota 8FG25 Forklift"></div>A product already named in the embed link is never overwritten.
A complete product page
Everything above, on one page, with both scripts in place. This is the arrangement to copy: it is the one where every feature is switched on.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>2021 Toyota 8FG25 Forklift</title>
<!-- SCRIPT 1 of 2: product structured data.
You almost certainly publish this already for Google. The widget reads
the product name straight out of it, so the enquiry form names the
machine without anyone typing it. -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "2021 Toyota 8FG25 Forklift",
"sku": "TOY-8FG25-21",
"offers": { "@type": "Offer", "price": "34900", "priceCurrency": "AUD" }
}
</script>
</head>
<body>
<h1>2021 Toyota 8FG25 Forklift</h1>
<!-- Where the calculator appears.
data-src is the embed link from the Partner Portal, used exactly as it
comes. data-product is optional - include it when the page has no
structured data, or when you want to override what it says. -->
<div class="ea-finance-widget"
data-src="https://www.easyasset.com.au/finance-calculator-widget.html?apiKey=your-key"
data-product="2021 Toyota 8FG25 Forklift"></div>
<!-- SCRIPT 2 of 2: the loader. Once per page, however many widgets
are on it, and last so it finds every container. -->
<script src="https://www.easyasset.com.au/js/ea-finance-widget.js" async></script>
</body>
</html>What that arrangement gives you, none of which needs any further configuration:
The enquiry form opens across the whole page, above your header and cookie bar, with the page blurred behind it.
The frame sizes itself to its content and follows it on resize, so there is no dead space or clipping on a phone.
The Product name arrives filled in, from
data-productif you set it and from the structured data if you did not.The buyer's figures travel with the enquiry, so the lead carries the amount, rate and term they were looking at.
Your colours and logo stay current, because the widget re-checks them on each load rather than trusting the link.
The frame is lazy loaded, so it costs your page nothing until it is nearly on screen.
Mobile
There is nothing to configure. The widget is fluid down to 320 pixels wide, its controls meet touch target sizes, and its inputs use a 16 pixel font so iOS does not zoom when one is focused.
Three things worth knowing:
The widget measures its own content and tells the loader, which sizes the iframe to match. This is the main reason a fixed height hurts on a phone, where the same widget is shorter than it is on a desktop and a desktop height leaves a band of dead space.
The enquiry form opens as a card inset from the edges of the screen with your page blurred behind it, rather than filling the screen edge to edge, so it reads as a popup over your site instead of a page of its own. It clears the iOS home indicator, and scrolling inside it does not scroll your page behind it.
The popup sits above everything on your page, including sticky headers and cookie bars. If a cookie banner currently covers part of the widget on your site, opening the form will cover the banner rather than the other way round.
You do not need a viewport meta tag beyond the standard one, and there is no separate mobile embed.
More than one widget on a page
You can put several on one page, and each one is independent. Give each container its own data-product if they are for different machines. Opening one leaves the others alone.
Content Security Policy
If your site sends a CSP header, three directives need to allow easyasset.com.au:
script-src https://www.easyasset.com.au
frame-src https://www.easyasset.com.au
img-src https://portalimages.blob.core.windows.netThe image host is for the EasyAsset logo in the widget footer.
What the loader does to your page
Worth knowing before you approve it: it adds one iframe inside your container, and while the enquiry form is open it adds one full screen backdrop element and sets overflow hidden on the document so the page behind does not scroll. Both are removed when the form closes. It reads your page's structured data, meta tags and first heading, and writes nothing to it. Enquiries are posted to EasyAsset from inside the iframe, so no customer data passes through your own code.
If something is not working
Nothing appears. Check the container has
class="ea-finance-widget"and adata-src. The console says so if the attribute is missing.It appears but the form opens inside the box. The script tag did not load. Check for a CSP block in the console.
The wrong product name. Something else on the page is being found first. Set
data-productto settle it.It loads late as you scroll. That is deliberate. The iframe is lazy loaded so it does not compete with your own page for bandwidth.
Frequently asked questions
Do I have to change my existing widget?
No. Plain iframe embeds keep working exactly as they are, and we have no plans to change that. Move over when it suits you.
Will it slow my website down?
The loader is small and loads asynchronously, so it does not block your page. The widget itself is lazy loaded and does not fetch until it is near the screen.
Can I change the colours?
Yes, in the Partner Portal under Website Widget. Change them there and your site picks them up by itself the next time someone loads the page. You do not need to copy the code again, and nobody has to edit your website.
Where do the enquiries go?
Straight to EasyAsset, and your usual contact follows them up.
Does the calculator affect a customer's credit score?
No. It is an estimate, and nothing about using it touches a credit file.
Can I put it on more than one page?
Yes, on as many as you like, with the same code each time. On product pages it is worth it, because each one picks up its own product name.
Could adding this break something on my website?
It cannot change your pages. The calculator sits inside its own sealed frame, so it has no way to alter your text, your images, your menus or anything else around it, and nothing your website already does can be undone by it.
There are two things that can go wrong, and neither one damages your site:
Nothing appears where you pasted it. Usually the code went into a text box rather than an HTML or embed box, so your website is showing it as words instead of running it. Check you used the right kind of block for your platform, using the table earlier in this guide.
The calculator shows, but the enquiry form opens inside the box instead of over the page. That means your website is blocking the second line of the code. Some website builders do this on their cheaper plans. The calculator still works and enquiries still reach us, it just looks less polished.
If neither of those sounds like what you are seeing, send us the address of the page and we will look at it.
How do I get help?
Email [email protected] with the page address you are trying to add it to.