Developers can use the CozyCal Javascript API to trigger on certain events.
// Add this code after the CozyCal script tag
<script>
window.onCozyCalLoaded = function (CozyCal) {
console.log('CozyCal loaded');
CozyCal
.on('show', function () {
console.log('opened');
})
.on('hide', function () {
console.log('hidden');
})
.on('scheduled', function (guest) {
// To receive this event, make sure you
// have set the domain where you installed CozyCal.
//
// Booking Page -> Share button -> Add to website
// -> Javascript API -> Set installed URL
//
// This is to ensure that guest data is
// only sent to verified domains.
console.log('scheduled', guest);
});
};
</script>