Widget event hooks

Listening to widget events allows you to easily track your conversions and provide custom functionality.

Marketing use case

A crucial aspect of running marketing campaigns for your restaurant is being able to track conversion events, such as when a guest who arrived from a campaign books a reservation. Aleno provides a way to hook into this event so you can do your tracking with any system you use – GTM, Segment, Meta Ads, Google Ads etc.

Tracking with Google Tag Manager

For a detailed guide on how to set up Google Tag Manager (GTM) to listen to these events, follow the GTM guide article.

Other use cases

You may also want to have your website dynamically react to what happens in the widget. For example, you could display a custom thank-you note on your website when the guest books a reservation.

Supported events

As of now, Aleno widget supports three key events.

If you have a need for more events, please contact support@aleno.me for a feature request.

reservation-booked

Fires when a guest creates a reservation in the widget. The event data contains a number of reservation properties that you can use further. (see below)

widget-opened Fires when the widget opens. No additional data is passed.
widget-closed Fires when the widget closes. No additional data is passed.

Reservation Booked

You can use this event to track your marketing conversion events, show a dedicated thank-you note and similar.

// Register the event handler
alenoPopup.on("reservation-booked", function(event) {
// Run your tracking or custom logic here
}

The event object contains the reservation properties that you can use further:

{
restaurantId: <string>,
  pax: <integer>,
  status: <string>,
  firstName: <string>,
  lastName: <string>,
  gender: <string>,
  email: <string>,
phoneNumber: <string>,
reservationAt: <string>,
  newsletterConfirmed: <boolean>
}

Widget opened

// Register the event handler
alenoPopup.on("widget-opened", function() {
// The widget has opened!
}

Widget closed

// Register the event handler
alenoPopup.on("widget-closed", function() {
// The widget has closed!
}