JS | Integrate a third-party analytics tracker with JavaScript events

If you use a tool different than Google Analytics for your statistics, you can use JavaScript event of Agendize scheduling widget to do so. Here is a list of all event listeners available:

$(window).load(function () {
  WIDGET.addEventListener('staffSelected', function fn1(event, data)
    {console.log("Staff selected");}
  );

  WIDGET.addEventListener('serviceSelected', function fn1(event, data)
    {console.log("Service selected");}
  );

  WIDGET.addEventListener('resourceSelected', function fn1(event, data)
    {console.log("Resource selected");}
  );

  WIDGET.addEventListener('dateSelected', function fn1(event, data)
    {console.log("Date selected");}
  );

  WIDGET.addEventListener('timesDisplayed', function fn1(event, data)
    {console.log("Times displayed");}
  );

  WIDGET.addEventListener('timeSelected', function fn1(event, data)
    {console.log("Time selected");}
  );

  WIDGET.addEventListener('formDisplayed', function fn1(event, data)
    {console.log("Form pre-loaded");
     $('form').submit(function () {
         console.log("Appointment confirmed");
     });
    }
  );
});