Listen for Widget State Changes with Custom Events
Listen for customer selections and trigger custom actions when delivery or pickup options change.
Custom events let you respond to customer interactions with your Bird Pickup & Delivery widget. Use them to update other page elements, track user behavior, or integrate with third-party services.
What Are Custom Events?
Custom events fire automatically when customers:
- Change delivery methods
- Select delivery or pickup dates
- Choose time slots
These events fire in real-time as customers interact with the widget. This allows you to build custom responsive, dynamic experiences that update immediately when selections change.
How to Implement Custom Events
- Listen for Events
Listen for birdchime:schedule event to track widget state changes. Below is an example JavaScript code that listens for widget state changes and logs them to the console:
document.addEventListener('birdchime:schedule', function({ detail }) {
console.log('Schedule event details:', detail);
});
- Event Data Structure
Example of returned response with delivery method local delivery, date and time selected:
{
"Delivery Method": "Delivery",
"Customer TimeZone": "America/Los_Angeles",
"_BirdChimeSlotId": "M=D;L=105145;D=2025-11-26;T=9:00 AM - 6:00 PM;TS=2025-11-12 11:32:30;S=R;Z=",
"locationId": 105145,
"shopifyLocationId": 80424370330,
"Delivery Date": "Nov 26, 2025",
"Delivery Day": "Wednesday",
"Delivery Time": "9:00 AM - 6:00 PM"
}
Troubleshooting
Event Not Firing?
- Check console: Look for JavaScript errors in browser developer tools
- Widget loading: Ensure the Bird Pickup & Delivery widget loads before your event listeners
Related Articles
- Complete Guide to Customizing Your Bird Pickup & Delivery Widget Design
- How to Manually Position Your Pickup & Delivery Widget
- Fix Widget Loading Issues in Dynamic Carts
Updated on: 11/12/2025
Thank you!
