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
- Go to the Custom Configurations page.
- 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
- Custom CSS & JavaScript Topic Outline
- Add Custom CSS & JavaScript How-To
- JavaScript Events Emitted Reference
Comments
0 comments
Article is closed for comments.