You are here

public function GoogleAnalyticsEventTracker::getJsSettings in Google Analytics Event Tracking 8.2

Same name and namespace in other branches
  1. 8 src/Entity/GoogleAnalyticsEventTracker.php \Drupal\google_analytics_et\Entity\GoogleAnalyticsEventTracker::getJsSettings()

Returns an array with the drupalSettings for this tracker.

Overrides GoogleAnalyticsEventTrackerInterface::getJsSettings

File

src/Entity/GoogleAnalyticsEventTracker.php, line 117

Class

GoogleAnalyticsEventTracker
Defines the Google Analytics event tracker entity.

Namespace

Drupal\google_analytics_et\Entity

Code

public function getJsSettings() {
  return [
    'selector' => $this->element_selector,
    'event' => $this->dom_event,
    'category' => $this->ga_event_category,
    'action' => $this->ga_event_action,
    'label' => $this->ga_event_label,
    'value' => $this->ga_event_value,
    'noninteraction' => $this->ga_event_noninteraction,
  ];
}