📦 Integration Options
Choose the integration method that best fits your needs
1) Embedded Widget (Recommended)
Add widget to your website. Place in
<head> tag.
<script
src="https://widget.qwerti.ai/buy.js"
data-token="6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN"
data-chain="792703809"
data-campaign="demo-123"
data-position="bottom-right"
data-auto-open="false"
data-widget="qwerti-widget"></script>
Required attributes:
data-token Token address
data-chain Blockchain network ID
Optional attributes:
data-campaign Campaign identifier
data-position
bottom-left
bottom-right (default)
data-auto-open
true
false (default)
2) Magic Link Integration
Direct link to token purchase flow. Use as regular link or in custom
buttons.
Link Format:
https://app.qwerti.ai/widget/{TOKEN}/{CHAIN}?campaign={CAMPAIGN}
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/widget/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 })
Qwerti.refreshWidget()
Qwerti.destroy()
Qwerti.reinit(overrides?)
Qwerti.on(event, handler)
Qwerti.off(event, handler)
Qwerti.getState()
Qwerti.version
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 60 seconds
- Auto-close: closes after 10s of inactivity
- 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
-
campaign is optional but helps with
analytics
Live Demo
Try the API below and see events in the logs.
reinit() with new parameters