<html>
<head>
<title>Integration Business Online App</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
</head>
<body class="m-5">
<h1>Integrate an appointment link</h1>
<p>To integrate a link for a service calendar into your existing website. You simply need to add a link to the URL we provided you during your onboarding. You may contact our support to obtain more information</p>
<a href="https://<your-business-prefix>.businessonline.app/Booking/Create/<service-id>">Book apointment</a>
<p class="mt-3">You can also register custom events into your dashboard using our API.</p>
<button class="btn btn-primary">Send click event</button>
</body>
</html>
xxxxxxxxxx
(() => {
function sendEvent(type) {
var body = { type, vendor: "<your-vendor-id>" };
fetch(window.location.href + "Marketing/Metric", {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(body)
}).then(response => {
if (response.status != 200) {
Promise.reject('Failed to make POST request. Status code: ' + response.status)
}
});
}
$("button").on('click', () => { sendEvent("click") });
sendEvent("traffic");
})();
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.