Widget options
Tune what the widget sells and how it looks with data attributes.
| Attribute | Values | What it does |
|---|---|---|
data-naara-key | wk_live_... | Required. Your public key. It identifies you but never authorises a request on its own |
data-product-type | esim, number, giftcard | Show only one product. Leave it out to show everything the key allows, as tabs |
data-mode | modal (default), redirect | Open checkout in a pop-up, or send the shopper to a full page |
data-theme | light, dark, auto | Match your site. auto follows the visitor's setting |
data-theme-color | #0A6E6E | Your accent colour as a six-digit hex value |
data-target | a CSS selector | Mount the widget somewhere other than #naara-widget |
data-account | on (default), off | Turn the shopper "My orders" area off |
data-start | account | Open straight on "My orders", for a dedicated page |
Verification numbers must be switched on by the operator, and the key needs the number product. Shoppers sign in to "My orders" with an emailed code, so nobody needs a password.
<div id="naara-widget"></div>
<script src="https://naara.app/widgets/merchant-widget.js"
data-naara-key="wk_live_your_public_key"
data-product-type="esim"
data-theme-color="#0A6E6E"
data-theme="auto" defer></script>
<div id="naara-widget"></div>
<script src="https://naara.app/widgets/merchant-widget.js"
data-naara-key="wk_live_your_public_key"
data-start="account" defer></script>