KarbonKit

Documentation

Widget integration guide

Embed KarbonKit widgets on any website with a single code snippet. Configure appearance, available technologies, and branding to match your site.

Quick start

There are two ways to embed KarbonKit widgets: a plain iframe (works wherever iframes are allowed, stays the height you set) or a script tag (the same one line for every widget, and it resizes itself to fit).

Option 1 – Iframe

Paste this into any HTML page. Works on WordPress, Squarespace, Wix, and static sites. Replace YOUR_CID with the config ID from your dashboard.

HTML
<iframe
  src="https://widgets.karbonkit.com/widget-embed?type=lct-calculator&cid=YOUR_CID"
  width="100%"
  height="900"
  frameborder="0"
  style="border: none; border-radius: 8px;"
  allow="clipboard-write"
></iframe>

Option 2 – Script tag

Works for every widget: the loader reads only your config ID, and the widget type, colours and options all come from the configuration saved against it. It resizes the widget to fit its content and passes on the permissions each widget needs (camera, microphone, fullscreen).

HTML
<script src="https://widgets.karbonkit.com/embed.js"></script>
<div data-karbonkit data-config-id="YOUR_CONFIG_ID"></div>

The loader looks for elements carrying both data-karbonkit and data-config-id. It also accepts the older <div data-heatpump-widget="YOUR_CONFIG_ID"> snippet, reading its value as the config ID. Other older data- attributes, such as data-widget-type, are not read. For new embeds, copy a fresh snippet from your dashboard.

Note: Get your config ID and a ready-to-use snippet from the . Accounts are free.

Integration reference

Every widget, with the values the dashboard puts in its iframe snippet. With the script tag you need none of these: the snippet is the same for every widget and the widget sizes itself.

WidgetIframe type=Script tagIframe heightAuto-resizesIframe allow=Config IDOptions (set in the dashboard)
Savings calculatorlct-calculatordata-karbonkit data-config-id900pxScript tag: yes. Iframe: only with the listener belowclipboard-writeRequiredBrand colour; company name; which technologies to offer (heat pump, solar PV, battery); installer finder after results (on by default); caveat banner (up to 240 characters); enquiry collection (off by default)
AR heat pump visualiserheat-pump-ardata-karbonkit data-config-id500pxScript tag: yes. Iframe: only with the listener belowcamera; xr-spatial-tracking; accelerometer; gyroscope; magnetometer; fullscreenRequiredBrand colour; background colour; which heat pump model loads first
Sound simulatorsound-simulatordata-karbonkit data-config-id700pxScript tag: yes. Iframe: only with the listener belowmicrophoneOptional – without one, default colours and no company nameCompany name (shown as "Provided by …"). The widget keeps its own colours; brand colour only tints the footer link
3D house tourhouse-tour (also system-diagram)data-karbonkit data-config-id660pxScript tag: yes. Iframe: only with the listener belowfullscreenOptional – without one, default colours and no company nameBrand colour; company name
Installer finderinstaller-finderdata-karbonkit data-config-id700pxScript tag: yes. Iframe: only with the listener belownone neededOptional – without one, default colours and no company nameBrand colour; company name; installer source (the public directory, your own list, or both); your own suggested installers
Grant eligibility findergrant-finderdata-karbonkit data-config-id900pxScript tag: yes. Iframe: only with the listener belownone neededOptional – without one, default colours and no company nameBrand colour; company name; link to the visitor's council (off by default); your own local schemes (off by default)
Boiler escape planboiler-escape-plandata-karbonkit data-config-id1000pxScript tag: yes. Iframe: only with the listener belownone neededOptional – without one, default colours and no company nameCompany name (shown as "Provided by …"); enquiry collection (off by default). The widget keeps its own colours; brand colour is used on the enquiry form and footer link

Options live in the dashboard, not the snippet. They are saved against your config ID, so a change takes effect on your live page without editing it. When the iframe src carries a dashboard config ID, other URL parameters are ignored (see legacy URL parameters).

Heights are the dashboard’s defaults. On mobile the calculator and boiler escape plan can run past 1500px once content stacks vertically, so a plain iframe either needs more room or the auto-resize listener.

Copy the allow list exactly. A plain iframe missing a permission loads normally and only fails when the visitor taps the button that needs it (View in your room, the decibel meter, fullscreen). The script tag passes on all of them for you.

Use a config ID even where it is optional. Without one there is nothing to change later from the dashboard, and no enquiry collection or local content.

Platform-specific setup

The iframe and script-tag snippets above work on any platform that allows HTML embeds, but each platform has its own way of accepting them. Here's the exact route for the popular ones.

Calculator widget

The calculator lets users enter a UK postcode or property details, then estimates heat pump sizing, solar PV output, battery savings, costs, and carbon impact. Configure it on the Calculator tab of your dashboard: brand colour, company name, which technologies to offer, whether nearby installers appear after the results, and an optional caveat banner.

Calculator
<iframe
  src="https://widgets.karbonkit.com/widget-embed?type=lct-calculator&cid=YOUR_CID"
  width="100%"
  height="900"
  frameborder="0"
  style="border: none; border-radius: 8px;"
  allow="clipboard-write"
></iframe>

AR widget

The AR widget lets users preview a heat pump in their space using augmented reality. It works on iOS Safari and Android Chrome – no app download required.

AR widget via iframe
<iframe
  src="https://widgets.karbonkit.com/widget-embed?type=heat-pump-ar&cid=YOUR_CID"
  width="100%"
  height="500"
  frameborder="0"
  style="border: none; border-radius: 8px;"
  allow="camera; xr-spatial-tracking; accelerometer; gyroscope; magnetometer; fullscreen"
  allowfullscreen
></iframe>

Set the model that loads first, your brand colour and the background colour on the AR tab of your dashboard. Keep the whole allow list: without camera and motion access the viewer loads, then fails when the visitor taps View in your room.

Installer finder widget

The installer finder lets users search for renewable energy installers near a UK postcode, ordered by distance. The directory is built from public records (Companies House, Google Places and installers’ own websites) and is not vetted by KarbonKit, so each result links to the MCS register for the visitor to check, and says where its technology tags came from. You can add your own suggested installers, shown first, or show only your own list.

Installer finder
<iframe
  src="https://widgets.karbonkit.com/widget-embed?type=installer-finder&cid=YOUR_CID"
  width="100%"
  height="700"
  frameborder="0"
  style="border: none; border-radius: 8px;"
></iframe>

Brand colour and company name are set in your dashboard, along with the options in the integration reference.

Tip: The installer finder also appears automatically after calculator results. Users who run a savings calculation will see nearby installers for their selected technologies.

Grant finder widget

The grant finder asks for a postcode and four quick questions (tenure, current heating fuel, EPC band, household circumstances) and shows which UK funding schemes the household may qualify for — the Boiler Upgrade Scheme, Warm Homes: Local Grant, ECO4, Home Energy Scotland, Nest, NISEP, 0% VAT relief, and the Smart Export Guarantee. Every result links to the official government page and shows the date the scheme data was last verified.

Local support (optional, off by default). From the Grant Finder tab of your dashboard you can add a link to the visitor’s council, and your own local schemes – council top-ups, local loans, advice services. Each local scheme can be limited to particular council areas and must have a date after which it stops showing. Local schemes are labelled as added by you; KarbonKit does not verify them. You can switch this on for a grant finder that is already embedded without changing your embed code. If you use a plain iframe with a fixed height, allow extra room for the new section.

Grant finder
<iframe
  src="https://widgets.karbonkit.com/widget-embed?type=grant-finder&cid=YOUR_CID"
  width="100%"
  height="900"
  frameborder="0"
  style="border: none; border-radius: 8px;"
></iframe>

Brand colour and company name are set in your dashboard, along with the options in the integration reference.

How the data stays current: scheme details are verified against official sources (gov.uk, Ofgem, Home Energy Scotland, gov.wales, NIHE) on a rolling review cycle. Schemes that have closed are hidden automatically, and if a scheme changes before our next review the widget tells users to confirm on the official page.

Boiler escape plan widget

The boiler escape plan walks a household through a short readiness check (postcode → EPC match → boiler age → home plans → motivation) and generates a personalised plan with an optional calendar reminder.

It covers mains gas, heating oil and LPG. Off-gas households get their own arithmetic rather than gas figures with the labels changed: heating oil emits about 35% more CO2 per kWh than mains gas, oil boilers run at a lower real-world seasonal efficiency, and the lock-in warning reflects that a breakdown means another oil boiler because there is no gas grid to fall back on. Worth knowing if your audience is rural – this is where the case for switching is strongest.

Boiler escape plan
<iframe
  src="https://widgets.karbonkit.com/widget-embed?type=boiler-escape-plan&cid=YOUR_CID"
  width="100%"
  height="1000"
  frameborder="0"
  style="border: none; border-radius: 8px;"
></iframe>

The widget is full-width and resizes its internal layout to fit. For mobile-heavy audiences, allow at least 1100px of height to avoid an internal scrollbar on the questions step.

Sound simulator widget

The sound simulator plays a real heat pump recording and uses the visitor's microphone to measure decibel level from different distances. Browsers require microphone permission, so the iframe needs an allow="microphone" attribute.

Sound simulator
<iframe
  src="https://widgets.karbonkit.com/widget-embed?type=sound-simulator&cid=YOUR_CID"
  width="100%"
  height="700"
  frameborder="0"
  style="border: none; border-radius: 8px;"
  allow="microphone"
></iframe>

HTTPS only: Browsers block microphone access on non-secure pages. The parent site must be served over HTTPS for the dB measurement to work.

3D house tour widget

An interactive 3D tour of a heat pump home: outdoor unit, pipework with animated heat flow, hot water cylinder, radiators, solar panels, and home battery. Users take a guided 9-stop tour or explore freely, with a day/night toggle showing the battery at work after dark. Add the allow attributes so users can enter fullscreen. (The legacy type=system-diagram also renders this widget.)

3D house tour
<iframe
  src="https://widgets.karbonkit.com/widget-embed?type=house-tour&cid=YOUR_CID"
  width="100%"
  height="660"
  frameborder="0"
  style="border: none; border-radius: 8px;"
  allowfullscreen
  allow="fullscreen"
></iframe>

Legacy URL parameters

Snippets from the dashboard carry only type and cid; everything else comes from the configuration saved against the config ID. The other parameters below are read only by older snippets whose cid was not issued by the dashboard. With a dashboard config ID they are ignored.

ParameterTypeDefaultDescription
cidstringConfig ID from your dashboard. All settings come from it. Required for the calculator and AR visualiser; see the integration reference for the others.
typestringheat-pump-arWidget type, from the integration reference. The type saved against a config ID takes precedence.
modelnumber7AR visualiser only: the model to load first, used when the saved configuration names none.
primaryhex#22c55ePrimary brand colour (URL-encoded).
secondaryhex#ffffffBackground colour (URL-encoded).
tierstringIgnored. Kept here because older snippets carry it; settings come from the config ID.
embedbooleanNo effect. Older snippets carry it.
companystringCompany name shown in calculator header.
lctsstringallComma-separated technologies: heatPump, solarPV, battery.
caveatstringCalculator only. Custom safety/caveat banner shown above the calculator (URL-encoded, max 240 chars). Useful for steering users toward your home-assessment process.

Collecting enquiries (optional)

The savings calculator and the boiler escape plan can show a short "get in touch" form after a visitor's results. It is off by default and nothing changes on your site until you turn it on – including on embeds that are already live. Switch it on per widget under Leads in your dashboard, give an address for the enquiries to go to, and name your organisation so visitors know who they are agreeing to hear from.

What you get. Name, email, an optional phone number, postcode, anything they typed, and a summary of what the widget worked out – the readiness score and weakest links for the boiler plan, the technologies and estimated savings for the calculator. That last part is the useful bit: it tells you whether someone needs a survey booked or a cylinder problem solving first, before you pick up the phone.

Where it goes. Straight to the address you set, with the visitor's address as the reply-to, and into your Leads tab. The dashboard copy is the durable one – if a notification email bounces, the enquiry is still there. Export the lot to CSV whenever you want it in your own system.

Your responsibility. People are consenting to hear from you, so your own privacy notice needs to cover contacting visitors who use the widget. We keep our copy for 12 months and then delete it, we never market to your visitors, and we pass enquiries to nobody else. See privacy for the section written for a data protection officer.

There is nothing to change in your embed code. The form is controlled entirely by the widget's saved configuration, so turning it on or off takes effect on your live page without you touching the snippet.

Auto-resizing iframes (optional)

By default the iframe stays the height you set on it, which means picking a value tall enough to fit the widget on the smallest screen you care about. On mobile the calculator and boiler escape plan can run past 1500px once content stacks vertically, so a desktop-tuned 700px will cut off mid-form.

KarbonKit widgets postMessage their current content height to the parent window on every resize. Add this small listener anywhere on the page and the iframe will track its content exactly – no scrollbar, no empty space, no fixed-height guessing. The script-tag embed does this for you.

HTML + JS
<iframe
  id="kk-calculator"
  src="https://widgets.karbonkit.com/widget-embed?type=lct-calculator&cid=YOUR_CID"
  width="100%"
  height="900"
  frameborder="0"
  style="border: none; border-radius: 8px;"
></iframe>

<script>
  window.addEventListener('message', function (event) {
    if (event.data && event.data.type === 'karbonkit:resize') {
      var iframe = document.getElementById('kk-calculator');
      if (iframe && event.source === iframe.contentWindow) {
        iframe.style.height = event.data.height + 'px';
      }
    }
  });
</script>

The check on event.source is important if you have more than one widget on the page – it scopes each height message to the right iframe. Always check the type too, so unrelated postMessages from other scripts don't accidentally resize the widget.

The height attribute on the <iframe> still matters as a fallback for the brief window before the first message arrives and for users who load with JavaScript disabled. Set it to a sensible default (the desktop height of the widget is a good start).

In a plain iframe the widget learns your page’s origin from the browser’s Referer header and sends height messages only to that origin. A page served with Referrer-Policy: no-referrer gets none, so use the script tag there.

Troubleshooting

Frequently asked questions

Ready to embed?

Sign up for a free account to configure your widgets visually and get a copy-paste embed code.