The RevenueHero JavaScript tracks and emits the following JavaScript events through the lifecycle of the meeting booking experience which can be captured using a sample message listener like the following to be used for actions like sending event to Google Analytics, Pixel, etc.

window.addEventListener('message', (ev) => {
  if(ev.data.type == 'MEETING_BOOKED') {
    // Send to Google Analytics
    dataLayer.push({ event: 'meeting_booked' });

    // Send to pixel
    fbq('track', 'RevenueHero', { event: 'meeting_booked' });
  }
})

MEETING_BOOKED

The event is sent when a meeting is booked successfully with the meeting payload

Payload
{
  "type": "MEETING_BOOKED",
  "meeting": {
    "id": "1234",
    "type": "meeting",
    "attributes": {
      "team_id": 123,
      "form_routing_rule_id": 123,
      "form_matching_rule_id": null,
      "name": "Road Runner and Coyote | Acme Inc.",
      "slug": "b60364750e05f1e74e623733c3c3c6476b496323",
      "status": "upcoming",
      "booker_name": "Road Runner",
      "booker_email": "road.runner@acme.inc",
      "meeting_time": "2023-11-24T05:30:00.000Z",
      "created_at": "2023-11-24T05:30:00.000Z",
      "cancellation_reason": null,
      "reschedule_count": 0,
      "last_rescheduled_at": null,
      "booking_guests": [],
      "calendar_notification_title": null,
      "calendar_notification_body": null,
      "reminder_notification_title": null,
      "reminder_notification_body": null,
      "conference_link": null,
      "parsed_name": "Road Runner and Coyote | Acme Inc.",
      "booking_participants": [{
          "name": "Road Runner",
          "email": "road.runner@acme.inc",
          "organizer": true,
          "rsvp_status": "accepted",
          "primary_guest": false
        },
        {
          "name": "Wile E. Coyote",
          "email": "wilee.coyote@acme.inc",
          "organizer": false,
          "rsvp_status": "accepted",
          "primary_guest": true
        }
      ],
      "duration": 30,
      "previous_meeting_time": null,
      "reminder_due": "2023-11-24T05:30:00.000Z",
      "time_zone": "America/Los_Angeles",
      "subdomain": "acme.inc",
      "in_progress": false
    }
  }
}

MEETING_RESCHEDULED

The event is sent when a meeting is rescheduled from the booking widget successfully with the meeting payload

Payload
{
  "type": "MEETING_RESCHEDULED",
  "meeting": {
    "id": "1234",
    "type": "meeting",
    "attributes": {
      "team_id": 123,
      "form_routing_rule_id": 123,
      "form_matching_rule_id": null,
      "name": "Road Runner and Coyote | Acme Inc.",
      "slug": "b60364750e05f1e74e623733c3c3c6476b496323",
      "status": "upcoming",
      "booker_name": "Road Runner",
      "booker_email": "road.runner@acme.inc",
      "meeting_time": "2023-11-24T15:30:00.000Z",
      "created_at": "2023-11-24T05:30:00.000Z",
      "cancellation_reason": null,
      "reschedule_count": 1,
      "last_rescheduled_at": "2023-11-24T05:30:00.000Z",
      "booking_guests": [],
      "calendar_notification_title": null,
      "calendar_notification_body": null,
      "reminder_notification_title": null,
      "reminder_notification_body": null,
      "conference_link": null,
      "parsed_name": "Road Runner and Coyote | Acme Inc.",
      "booking_participants": [{
          "name": "Road Runner",
          "email": "road.runner@acme.inc",
          "organizer": true,
          "rsvp_status": "accepted",
          "primary_guest": false
        },
        {
          "name": "Wile E. Coyote",
          "email": "wilee.coyote@acme.inc",
          "organizer": false,
          "rsvp_status": "accepted",
          "primary_guest": true
        }
      ],
      "duration": 30,
      "previous_meeting_time": "2023-11-24T05:30:00.000Z",
      "reminder_due": "2023-11-24T05:30:00.000Z",
      "time_zone": "America/Los_Angeles",
      "subdomain": "acme.inc",
      "in_progress": false
    }
  }
}

CLOSE_ADD_GUEST

The event is sent when a prospect exits from the guest addition textbox

Payload
{
	type: 'CLOSE_ADD_GUEST'
}

ADDING_GUEST

The event is sent when a prospect clicks on the Invite Guest button and lands in the guest addition textbox

Payload
{
	type: 'ADDING_GUEST'
}

ADDED_GUEST

This event is sent when a prospect adds a guest address in the guest addition textbox on the booking confirmation screen

Payload
{
	type: 'ADDED_GUEST'
}

RESIZE_IFRAME

The event is sent when the Iframe’s height change is detected on slots getting loaded

Payload
{
	type: 'RESIZE_IFRAME',
	height: 535 // In pixels
}

CLOSE_DIALOG

This event is sent when a prospect closes the pop-up scheduler

Payload
{
	type: 'CLOSE_DIALOG'
}

INIT_REDIRECT

This event is sent when the redirect timer starts

Payload
{
	type: 'INIT_REDIRECT'
}

PAGE_LOADED

This event is sent when the scheduler with the booking time slots are displayed to the prospect

Payload
{
	type: 'PAGE_LOADED'
}

RESCHEDULE_CLICKED

This event is sent when a reschedule is initiated from the booking confirmation screen

Payload
{
	type: 'RESCHEDULE_CLICKED'
}