Qwerti Logo

Qwerti Widget
Documentation

Embeddable widget to display token details on any website

Live preview running on this page
The widget is mounted right here — look for the floating trigger in the bottom-right corner. Open it to see the real Qwerti experience (campaign asteroid-1-67759).

📦 Integration Options

Choose the integration method that best fits your needs

1) Embedded Widget (Recommended)

Add widget to your website. Place in <head> tag. Token, chain, position and behaviour are configured on the campaign side (app.qwerti.ai/campaign/create) — the snippet only carries the campaign id.
<script
  src="https://widget.qwerti.ai/widget/v1/buy.js"
  data-campaign="demo-123"></script>
Required attributes:
data-campaign Campaign identifier. Drives token, chain and UI config server-side.
Optional attributes:
data-widget qwerti-widget — explicit marker for bootstrap when several scripts share the page.

2) Magic Link Integration

Direct link to token purchase flow. Use as regular link or in custom buttons.
Link Format:
https://app.qwerti.ai/buy/{TOKEN}/{CHAIN}?campaign={CAMPAIGN}
/widget/{TOKEN}/{CHAIN} is a supported alias of the same route.
Option A: Simple Link
<a href="https://app.qwerti.ai/buy/6p6x.../792703809?campaign=demo"
   target="_blank">
  Buy Token
</a>
Option B: Popup Window
<button onclick="window.open(
  'https://app.qwerti.ai/buy/6p6x.../792703809?campaign=demo',
  '_blank',
  'width=1150,height=700,scrollbars=no,resizable=no'
)">
  Buy Token
</button>

3) Widget API

Qwerti.openWidget()
Qwerti.closeWidget()
Qwerti.updateWidget({ token, chain }) // multi_token only
Qwerti.refreshWidget()
Qwerti.destroy()
Qwerti.on(event, handler)
Qwerti.off(event, handler)
Qwerti.version
Re-init: there is no reinit() method. To restart with a new campaign call destroy(), remove the <script> tag and inject it again with updated data-campaign. Bootstrap detects the existing window.Qwerti and re-mutates the methods on the same object so existing event subscriptions stay valid.
updateWidget: swaps token/chain at runtime — only valid for multi_token campaigns. Throws for single_token (token is fixed by campaign config).
Events:
ready open close tokenDetails:loaded tokenDetails:error popup:opened destroy

4) Features & Best Practices

Widget Features:
  • Token info: price, 24h change, market cap, volume
  • Auto-polling: updates every 15 seconds while open
  • Responsive design for all screen sizes
When to use each method:
  • Embedded Widget: For persistent presence across multiple pages
  • Magic Link (New Tab): Simplest integration
  • Magic Link (Popup): Quick action without leaving current page
💡 Integration Tips:
  • Place widget script in <head> tag for best reliability
  • Use popup for CTAs to keep users on your site
  • Test on mobile devices - all methods are responsive
  • data-campaign is required — without it the kernel logs a warning and the widget does not mount