Execute your callback functions when current customer profile changes.
If no customer is logged in, these functions receive null. Whenever a customer logs in/out, the callback functions are called with either the corresponding parameter of type Customer or null. Ecwid.OnSetProfile code example:
Ecwid.OnSetProfile.add(function(customer){
console.log(customer.email);
// "[email protected]"
})
Customer details
Learn more about Getting customer details