Embedding the widget
Everything you need to install the Squeegify widget on any website — WordPress, Wix, Shopify, Carrd, plain HTML, or a framework of your choice.
Quick start
Paste one line of HTML anywhere in your site — it's best right before </body>:
<script src="https://yoursite.com/embed.js" data-key="YOUR_KEY" async ></script>
By default that installs both a floating button bottom-right and (if a target div is present) an inline form.
Mode selection
Choose how the widget appears with the data-mode attribute:
| Mode | Shows | Needs target div |
|---|---|---|
| both | Floating button + inline form (default) | Optional |
| floating | Bottom-right floating button only | No |
| inline | Full form rendered inside your chosen div | Yes — #squeegify-widget by default |
All attributes
| Attribute | Default | Purpose |
|---|---|---|
| data-key | — | Your unique widget key (from dashboard). Required. |
| data-mode | both | floating | inline | both |
| data-target | #squeegify-widget | CSS selector for inline mount point |
| data-label | Get instant quote | Floating button text |
| data-brand | #059669 | Hex colour for buttons and accents |
| data-position | bottom-right | bottom-right | bottom-left | top-right | top-left |
| data-width | 620 | Max width of inline iframe (px) |
| data-height | 820 | Min height of inline iframe (px) |
| data-auto-open | false | Open the modal 800ms after page load |
Events (postMessage)
The widget posts messages to the parent page so you can track conversions in GA, Plausible, or anywhere:
window.addEventListener("squeegify:quote_shown", (e) => {
console.log("Quote shown:", e.detail.total, e.detail.currency);
});
window.addEventListener("squeegify:booking_confirmed", (e) => {
// fire your GA conversion here
gtag("event", "booking", { value: e.detail.total, currency: "GBP" });
});Events fired: squeegify:open, squeegify:close, squeegify:step_change, squeegify:address_submitted, squeegify:quote_shown, squeegify:booking_confirmed.
Troubleshooting
- Widget doesn't appear: open DevTools → Console. Mixed-content or localhost warnings print with a clear reason.
- Inline mode not rendering: ensure the target element exists before the script runs. Script is async — that's fine, just place the div above or below somewhere.
- Carrd / Wix not showing: use the Embed/HTML element type, not a styled text block. The script needs to execute.