The short version
Insert this line just before </body> on your page. Then you're ready: a «Buy gift card» button appears in the corner, and it opens your shop in a window on top of the page.
<script src="https://shop.kuvert.dk/embed.js" data-slug="dit-butiksnavn"></script>Four ways to do it
| Method | What you write | When |
|---|---|---|
| Floating button | Only the <script> line | Fastest. Sticks in the corner on all pages. |
| Button where you want | <span data-kuvert-buy></span> | Place it next to a product, in the menu, in the footer. As many as you want. |
| Your own button | data-kuvert-open on your own element | You already have a button or a link that fits your page. |
| Whole shop | <div data-kuvert-inline></div> | The gift card page is displayed directly on your page — no button, no window. |
The floating button disappears by itself as soon as you insert one of your own. You never end up with two buttons by accident.
<!-- One button per product, each with its own amount -->
<span data-kuvert-buy data-amount="300" data-label="Gavekort · 300 kr."></span>
<span data-kuvert-buy data-amount="500" data-label="Gavekort · 500 kr."></span>
<!-- Your own link in the menu -->
<a href="/gavekort" data-kuvert-open>Gavekort</a>
<!-- Once, at the foot of the page -->
<script src="https://shop.kuvert.dk/embed.js" data-slug="dit-butiksnavn"></script>Here's what it will look like
Try it out below. These are the real buttons — same size and shapes as your customers see.
Filled
Standard. Your colour, white text.
data-variant="solid"Border
For light pages and secondary placements.
data-variant="outline"Text only
For a menu or footer.
data-variant="text"
What you select here matches the attributes below. In the dashboard there's the same setup with a button that copies the code — you don't need to type it yourself.
If you already have a design you'd rather use, set data-class to your own classes. Then we keep our hands off the look entirely, and the button inherits your own styling instead of clashing with ours.
<span data-kuvert-buy data-class="btn btn-primary"></span>Choose what the button opens
A button can point to a specific product, a fixed amount, a quantity — and start the buyer further into the flow. That's how «Buy gift card · 500 kr.» becomes one click instead of four.
<span data-kuvert-buy
data-product="prod_spaophold"
data-amount="500"
data-quantity="2"
data-label="To spa-gavekort · 500 kr."></span>A button for your next event
data-event normally points to one specific event. If you write next instead, the button opens the next one that's for sale — and you don't have to edit your page every time you set a new date.
<a href="/arrangementer" data-kuvert-open data-event="next">Billetter</a>All options
| Attribute | Where | Example |
|---|---|---|
| data-slug | <script> | anyone |
| data-origin | <script> | https://shop.kuvert.dk |
| data-locale | both | da |
| data-button | <script> | auto |
| data-kuvert-buy | on the element | — |
| data-kuvert-open | on the element | — |
| data-kuvert-inline | on the element | — |
| data-label | both | Buy gift card |
| data-color | both | #b8935a |
| data-text-color | both | #ffffff |
| data-size | both | md |
| data-shape | both | pill |
| data-variant | both | solid |
| data-block | both | true |
| data-class | both | min-knap |
| data-position | <script> | br |
| data-product | both | prod_open |
| data-amount | both | 500 |
| data-quantity | both | 1 |
| data-step | both | personalize |
| data-event | both | next |
| data-campaign | both | cmp_jul |
| data-height | both | 640 |
| data-mode | both | modal |
| data-consent | <script> | granted |
| data-scheme | both | dark |
| data-booking | both | true |
For developers
The script places window.kuvert on the page, so a single-page app can open the shop from its own code, and sends events on window, which your own analytics tool can listen to.
kuvert.open({ product: 'prod_spaophold', amount: 500 })
kuvert.close()
window.addEventListener('kuvert:checkout', (e) => {
// e.detail — pass it on to your own analytics
})- kuvert:ready — the script is loaded and the buttons are set up
- kuvert:open — the shop was opened
- kuvert:close — the shop was closed again
- kuvert:checkout — the buyer clicked pay, with amount and quantity
Render your page's buttons after the script has run — as a React or Vue page would — then call kuvert.refresh(). It collects new buttons and skips the ones it already knows.
Consent when the shop is on your page
If you've placed a Google Tag Manager container on your gift card page, it runs only when the customer has consented. If the customer opens the shop directly on shop.kuvert.dk, Kuvert asks itself — once, and the answer is remembered. But if the shop is embedded on your own page, YOUR cookie banner has already asked, so Kuvert shouldn't ask again in the middle of a modal just before the customer pays. You pass the answer on:
<!-- server-side banner: set the attribute -->
<script src="https://shop.kuvert.dk/embed.js" data-slug="dit-butiksnavn"
data-consent="granted"></script>// JavaScript banner: tell us when the customer answers
kuvert.consent(true) // or false, if they decline