Customize Your Pricing
Set the prices for your location. All embed codes below update automatically.
These prices are passed via the embed URL so each franchise location can set their own. The widget will show quotes based on your custom pricing.
Live Preview
Iframe Embed (Recommended)
Works on any website. Just paste this one line of HTML where you want the widget to appear.
height="900" if needed. The widget is responsive and works on desktop and mobile.
Responsive Embed with Auto-Resize
Uses a small script to automatically resize the iframe height. Best for pages where the widget sits alongside other content.
WordPress
Add the widget to any WordPress page or post using the block editor or a shortcode plugin.
Block Editor (Gutenberg)
- Open the page or post where you want the widget.
- Click the + button to add a new block.
- Search for "Custom HTML" and select it.
- Paste the iframe code below into the HTML block.
- Click Preview to verify, then Publish.
Classic Editor
- Switch to the Text tab (not Visual).
- Paste the same HTML code above.
- Switch back to Visual to confirm placement, then Publish.
Squarespace / Wix / Webflow
Most website builders support embedding custom HTML or iframes.
Squarespace
- Add a Code Block to your page.
- Paste the iframe code (Option 1 above).
- Save and publish.
Wix
- Add an Embed / HTML element.
- Choose "Embed a Site" and paste the embed URL:
Webflow
- Drag an Embed element onto your page.
- Paste the iframe code (Option 1).
- Publish your site.
Direct Link
Share the full standalone version as a direct link โ perfect for emails, social media, or QR codes.
https://quote.costaoils.com/
Tracking & Analytics
The widget fires events you can listen for to connect with Google Analytics, Meta Pixel, or any marketing tool.
<script>
window.addEventListener('message', function(event) {
if (event.data && event.data.type === 'costaOilEvent') {
var name = event.data.event;
// name is one of:
// 'quote_generated' โ customer saw their price estimate
// 'lead_submitted' โ customer filled in contact form
// 'coupon_claimed' โ customer clicked Get In-Store Offer
// 'find_location' โ customer clicked Find Nearest Location
// Google Analytics 4:
// gtag('event', name, event.data.data);
// Meta Pixel:
// fbq('track', name === 'lead_submitted' ? 'Lead' : 'ViewContent');
console.log('Costa Oil widget event:', name, event.data.data);
}
});
</script>