Buy ticket buttons

Embed a Buy tickets button on your own website. When someone clicks it, the BooTickets checkout opens in a modal right there — they never leave your page.

Quick start

Paste this where you want the button to appear, using your event's ID:

<!-- BooTickets CTA -->
<bootickets-cta event="<event-id>"></bootickets-cta>

<script async src="https://bootickets.com/embed/v1/loader.js"></script>

The button label reflects the event's status automatically — Buy tickets, Sold out, Coming soon, and so on. You only need to include the <script> tag once per page, even if you show several buttons.

Attributes

AttributeRequiredDescription
eventYesThe event ID to sell.
colorNoAccent colour for the button (any CSS colour).
langNoLanguage code for button text (default en).
<bootickets-cta event="<event-id>" color="#e11d48" lang="en"></bootickets-cta>

Events you can listen for

The widget dispatches DOM events you can hook into for analytics:

EventFires when
bt:viewThe button is added to the page.
bt:statusThe event's status has loaded (detail includes the event).
bt:clickThe buyer clicks the button.
bt:purchaseA purchase completes.
<script>
  document.addEventListener('bt:purchase', (e) => {
    console.log('Ticket purchased', e.detail);
    // e.g. fire a conversion event to your analytics here
  });
</script>

Opening checkout from your own code

If you'd rather trigger checkout from a custom button, the loader exposes a small global API:

// Open the ticket checkout for an event
await window.BooTickets.openCheckoutModal({ event });

// Open a donation checkout
await window.BooTickets.openDonationModal({
  customerId: '<organiser-id>',
  organiserName: 'Your name',
  currency: 'GBP',
});

// Override defaults (accent colour, API/asset bases)
window.BooTickets.configure({ accentColor: '#e11d48' });

openCheckoutModal and openDonationModal resolve with { confirmed, orderId, checkoutId } when the modal closes.