Listen for Custom JavaScript Events (Reference)

Article Details

Summary

Add code that listens for custom JavaScript events in the Customer app JS or Customer app footer field on the Custom Configurations page.

Steps

  1. Go to the Custom Configurations page.
  2. Add your listener code to the Customer app JS or Customer app footer field. These examples listen for the reservation_created and owner_created events.
document.addEventListener('reservation_created', function (e) {
  // add conversion code here
  // e.detail.reservation_ids is an object which contains the animal ID & reservation IDs of what was just created
}, false);
document.addEventListener('owner_created', function (e) {
  // add conversion code here
  // e.detail is an object which contains the user supplied data that was submitted on the form.
}, false);

Related Articles

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.