You are here

public static function PixelSubscriber::getSubscribedEvents in Simple Facebook Pixel 8

File

src/EventSubscriber/PixelSubscriber.php, line 83

Class

PixelSubscriber
Class PixelSubscriber.

Namespace

Drupal\simple_facebook_pixel\EventSubscriber

Code

public static function getSubscribedEvents() {
  $events[KernelEvents::RESPONSE][] = [
    'onKernelResponse',
  ];
  $events['commerce_cart.entity.add'][] = [
    'addToCartEvent',
  ];
  $events['commerce_wishlist.entity.add'][] = [
    'addToWishlist',
  ];
  $events['flag.entity_flagged'][] = [
    'addToWishlistFlag',
  ];
  $events['commerce_order.place.post_transition'][] = [
    'purchaseEvent',
    50,
  ];
  return $events;
}