You are here

final class EnhancedEcommerceEvents in Commerce Google Tag Manager 8.2

Same name and namespace in other branches
  1. 8 src/Event/EnhancedEcommerceEvents.php \Drupal\commerce_google_tag_manager\Event\EnhancedEcommerceEvents

Defines events for the Commerce Google Tag Manager Enhanced Ecommerce module.

Hierarchy

Expanded class hierarchy of EnhancedEcommerceEvents

4 files declare their use of EnhancedEcommerceEvents
EnhancedEcommerceEventsTest.php in tests/src/Unit/EnhancedEcommerceEventsTest.php
EventStorageService.php in src/EventStorageService.php
EventStorageServiceTest.php in tests/src/Unit/EventStorageServiceTest.php
EventTrackerService.php in src/EventTrackerService.php

File

src/Event/EnhancedEcommerceEvents.php, line 8

Namespace

Drupal\commerce_google_tag_manager\Event
View source
final class EnhancedEcommerceEvents {

  /**
   * Allows to alter the GTM Product field mapping.
   *
   * Allows alteration of field mapping from Commerce product to a GTM Product.
   * Use this event to alter data Product before it gets pushed to data layer.
   *
   * @Event
   *
   * @see \Drupal\commerce_google_tag_manager\Event\AlterProductEvent
   */
  const ALTER_PRODUCT = 'commerce_google_tag_manager.alter_product';

  /**
   * Allows to alter the GTM Product field mapping.
   *
   * Allows alteration of field mapping from Commerce product to a GTM Product.
   * Use this event to alter data Product in case there is no product variation
   * before it gets pushed to data layer.
   *
   * @Event
   *
   * @see \Drupal\commerce_google_tag_manager\Event\AlterProductPurchasedEntityEvent
   */
  const ALTER_PRODUCT_PURCHASED_ENTITY = 'commerce_google_tag_manager.alter_product_purchased_entity';

  /**
   * Allows to alter the event data of each Enhanced Ecommerce event.
   *
   * Allows alteration before it gets pushed to the data layer.
   *
   * @Event
   *
   * @see \Drupal\commerce_google_tag_manager\Event\AlterEventDataEvent
   */
  const ALTER_EVENT_DATA = 'commerce_google_tag_manager.alter_event_data';

  /**
   * Event fired when tracking a checkout step.
   *
   * This allows event listeners to track additional checkout step options.
   *
   * @Event
   *
   * @see \Drupal\commerce_google_tag_manager\Event\TrackCheckoutStepEvent
   */
  const TRACK_CHECKOUT_STEP = 'commerce_google_tag_manager.track_checkout_step';

}

Members

Namesort descending Modifiers Type Description Overrides
EnhancedEcommerceEvents::ALTER_EVENT_DATA constant Allows to alter the event data of each Enhanced Ecommerce event.
EnhancedEcommerceEvents::ALTER_PRODUCT constant Allows to alter the GTM Product field mapping.
EnhancedEcommerceEvents::ALTER_PRODUCT_PURCHASED_ENTITY constant Allows to alter the GTM Product field mapping.
EnhancedEcommerceEvents::TRACK_CHECKOUT_STEP constant Event fired when tracking a checkout step.