Listen for Custom JavaScript Events (Reference)

Article Details

Introduction

You'll want to add your code that listens for custom JavaScript events in the Customer app JS or Customer app footer field on the Custom Configurations page. Below is an example listener function for the reservation_created event. 

 

Example:

Js
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);

 

Js
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 Resources

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.