Freeform Freeform for Craft

Developer

Email Marketing Integration Events

Use these events to extend the functionality of Freeform Email Marketing integrations:

After the response from the Email Marketing was received

This event contains the Guzzle Response object of the response received after pushing the data to the Email Marketing.

use Solspace\Freeform\Events\Integrations\IntegrationResponseEvent;
use Solspace\Freeform\Library\Integrations\Types\EmailMarketing\EmailMarketingIntegrationInterface;

Event::on(
  EmailMarketingIntegrationInterface::class,
  EmailMarketingIntegrationInterface::EVENT_AFTER_RESPONSE,
  function (IntegrationResponseEvent $event) {
    $integration = $event->getIntegration();
    $category = $event->getCategory();
    $response = $event->getResponse();
    $responseAsString = $event->getResponseBodyAsString();

    // Perform some actions here
  }
);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15