How to execute Javascript function after a product is added to cart?

I’m trying to configure Sendinblue Automation to work with Magento 2. In order to do that, I have to execute some Javascript functions after some Magento events like:

  • After a product is added to cart.
  • After the cart is updated.
  • After the cart is empty.
  • After a product is bought.

How can I do that?