JS Widget
What it does
Lightweight JavaScript widget (~15KB) that embeds a landed cost calculator on any website. Works with any e-commerce platform or custom site. Drop in a single script tag and the widget auto-renders with product data from the page.
How to use it
Add the script tag
Include <script src="https://cdn.potal.app/widget.js" data-key="pk_live_..."></script> on your page.
Pass product data
Set data attributes (data-product, data-price, data-origin) or pass via JavaScript API.
Customize appearance
Use data-theme="dark" or pass custom CSS variables to match your site design.
Listen for events
The widget fires JavaScript events (potal:calculated, potal:error) for custom integrations.
Related Features
Native Shopify Theme App Extension with one-click install
Customizable widget that matches your brand colors and style
Apply your logo, colors, and fonts to all customer-facing elements
DDP/DDU checkout flow with fraud detection and session management
Official JavaScript/TypeScript SDK published on npm