You are here

public function AutoLink::getSettingCommands in Googalytics - Google Analytics 8

An array of commands to be sent to Google Analytics.

Return value

array An array of command values.

Overrides Generic::getSettingCommands

File

src/AnalyticsCommand/Linker/AutoLink.php, line 58

Class

AutoLink
Class AutoLink.

Namespace

Drupal\ga\AnalyticsCommand\Linker

Code

public function getSettingCommands() {
  $command = [
    ($this->trackerName ? $this->trackerName . '.' : '') . $this->command,
    $this->domains,
  ];
  if (!is_null($this->useAnchor)) {
    $command[] = $this->useAnchor;
  }
  elseif (!is_null($this->decorateForms)) {
    $command[] = FALSE;
  }
  if (!is_null($this->decorateForms)) {
    $command[] = $this->decorateForms;
  }
  return [
    $command,
  ];
}