Magento 2 : Newsletter Subscription Event

Fernando Miguel's answer doesn't work, change

newsletter_subscriber_save_before

For

newsletter_subscriber_save_after

After that, you'll be able to get the subscriber ID. Or even get the email using

$observer->getEvent()->getSubscriber()->getSubscriberEmail()

All these functions are available too:

 int getStoreId()
 $this setStoreId(int $value)
 string getChangeStatusAt()
 $this setChangeStatusAt(string $value)
 int getCustomerId()
 $this setCustomerId(int $value)
 string getSubscriberEmail()
 $this setSubscriberEmail(string $value)
 int getSubscriberStatus()
 $this setSubscriberStatus(int $value)
 string getSubscriberConfirmCode()
 $this setSubscriberConfirmCode(string $value)
 int getSubscriberId()
 Subscriber setSubscriberId(int $value)

You can use the predispatch/postdispatch events triggerred by the controller action class. In your case:

  • controller_action_predispatch_newsletter_manage_save to observe a behavior BEFORE the save method is called.
  • controller_action_postdispatch_newsletter_manage_save to observer a behavior AFTER the save method is called.