Learn how to embed the event ticket purchase widget on your own website
The inline widget is embedded directly within your page content:
<div data-eventsaas-widget data-event-id="1"></div>
The modal widget opens in a fullscreen overlay when users click a button:
<div data-eventsaas-widget data-event-id="1" data-widget-mode="button" data-button-text="Buy Tickets"></div>
First, add our embed script to your HTML page. Place this right before the closing </body>
tag:
<script src="https://fairticket.app/widget/embed.js"></script>
You can embed the widget either inline or as a button that opens a modal:
<!-- Inline Widget -->
<div data-eventsaas-widget data-event-id="123"></div>
<!-- Button/Modal Widget -->
<div data-eventsaas-widget data-event-id="123" data-widget-mode="button" data-button-text="Buy Tickets"></div>
Replace 123
with your actual event ID.
If you're using a different domain than the default, you can configure the widget URL:
<script>
window.EVENTSAAS_WIDGET_URL = "https://yourdomain.com";
</script>
<script src="https://yourdomain.com/widget/embed.js"></script>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Event Page</title>
</head>
<body>
<h1>Join Our Amazing Event!</h1>
<!-- Button/Modal Widget -->
<div data-eventsaas-widget data-event-id="1" data-widget-mode="button" data-button-text="Get Tickets"></div>
<script src="https://fairticket.app/widget/embed.js"></script>
</body>
</html>