Back to Features
🔗

JS Widget

ActiveIntegrationMUSTFREE

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

1

Add the script tag

Include <script src="https://cdn.potal.app/widget.js" data-key="pk_live_..."></script> on your page.

2

Pass product data

Set data attributes (data-product, data-price, data-origin) or pass via JavaScript API.

3

Customize appearance

Use data-theme="dark" or pass custom CSS variables to match your site design.

4

Listen for events

The widget fires JavaScript events (potal:calculated, potal:error) for custom integrations.

Related Features

Having issues?