Skip to content

Buttons on your own page

Your shop can stand on its own, but most sales happen where the customer already is. One line of code puts a button on your page, and you decide where it goes, what happens when it is clicked and how it looks.

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.

HTML
<script src="https://shop.kuvert.dk/embed.js" data-slug="dit-butiksnavn"></script>

Four ways to do it

MethodWhat you writeWhen
Floating buttonOnly the <script> lineFastest. 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 buttondata-kuvert-open on your own elementYou already have a button or a link that fits your page.
Whole shop<div data-kuvert-inline></div>Your shop is shown directly on your page without a button or a 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.

HTML
<!-- 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, with the same sizes and shapes as the ones your customers will see.

Size
Corners
  • 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 is the same setup with a button that copies the code, so 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.

HTML
<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 or a quantity and start the buyer further into the flow. That is how «Buy gift card · DKK 500» becomes one click instead of four.

HTML
<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 is on sale, so you do not have to edit your page every time you set up a new date.

HTML
<a href="/arrangementer" data-kuvert-open data-event="next">Billetter</a>

All options

AttributeWhereExample
data-slug<script>anyone
data-origin<script>https://shop.kuvert.dk
data-localebothda
data-button<script>auto
data-kuvert-buyon the element—
data-kuvert-openon the element—
data-kuvert-inlineon the element—
data-labelbothBuy gift card
data-colorboth#b8935a
data-text-colorboth#ffffff
data-sizebothmd
data-shapebothpill
data-variantbothsolid
data-blockbothtrue
data-classbothmin-knap
data-position<script>br
data-productbothprod_open
data-amountboth500
data-quantityboth1
data-stepbothpersonalize
data-eventbothnext
data-campaignbothcmp_jul
data-heightboth640
data-modebothmodal
data-consent<script>granted
data-schemebothdark
data-bookingbothtrue
data-dateboth2026-11-06
data-tierbothtier_loge6
data-viewbothtables
data-compactbothtrue

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.

JavaScript
kuvert.open({ product: 'prod_spaophold', amount: 500 })
kuvert.close()

// The same choices as a plain link, for a mail, a QR code or a new tab
kuvert.url({ event: 'next', view: 'tables' })

window.addEventListener('kuvert:checkout', (e) => {
  // e.detail: pass it on to your own analytics
})
  • kuvert:ready: the script has loaded and the buttons are set up
  • kuvert:open: the shop was opened
  • kuvert:close: the shop was closed again
  • kuvert:checkout: the buyer pressed pay. It includes the amount, quantity, currency and what was bought (gift card, ticket, table or cart), and for an event its ID and the IDs of its prices

If your page renders its buttons after the script has run, as a React or Vue page does, call kuvert.refresh() afterwards. It picks up new buttons and skips the ones it already knows.

Consent when the shop is on your page

If you have put a Google Tag Manager container in your shop, it only runs once the customer has said yes. If the customer opens the shop directly on shop.kuvert.dk, Kuvert asks once itself, and the answer is remembered. But if the shop is embedded on your own page, YOUR cookie banner has already asked, and Kuvert should not ask again in the middle of a modal just before the customer pays. You pass the answer on:

HTML
<!-- server-side banner: set the attribute -->
<script src="https://shop.kuvert.dk/embed.js" data-slug="dit-butiksnavn"
        data-consent="analytics ads"></script>
<!-- statistics only: data-consent="analytics" -->
JavaScript
// JavaScript banner: tell us when the customer answers
kuvert.consent(true) // or false, if they decline
// or each half on its own:
kuvert.consent({ analytics: true, ads: false })

Statistics and marketing, each on its own

Your banner most likely asks about statistics and marketing separately, and you can pass that on: analytics is statistics, ads is marketing. If the customer only said yes to statistics, your Google Analytics measures, while your ad tags get a no through Google Consent Mode. data-consent="granted" and kuvert.consent(true) still mean yes to both.

The answer also carries through the payment. When the customer comes back from Stripe they are no longer on your site, but Kuvert does not ask again: the answer your banner gave when the customer pressed pay also applies on the page after the payment, so the purchase reaches your container. If the customer withdraws their yes before paying, that no carries through in the same way.

If you have set up a Meta pixel ID and an access token under Integrations, Kuvert sends the purchase to Meta from the server, but only for a customer who has agreed to marketing. With a yes, your site also passes its own Meta cookie (_fbp) and the ad click's (_fbc) into the shop, so Meta can find the ad that led to the purchase.

Ticket sales under your own page about the night

If your own page already shows the poster, door times, age limit, description and lineup, the ticket sales below it need not repeat them. Put data-compact beside data-event, and the frame shows only the night's name and date, followed by what it takes to buy: tickets and tables, prices, the table map and the basket. Opened in a new tab, the whole night is back.

HTML
<div data-kuvert-inline data-event="nytaarsaften" data-compact></div>

Was this page helpful?