You are here

public function AmpAnalytics::getOutput in Analytics 8

Returns the output of the analytics service.

Return value

array A structured, renderable array.

Overrides ServicePluginBase::getOutput

File

analytics_amp/src/Plugin/AnalyticsService/AmpAnalytics.php, line 70

Class

AmpAnalytics
Provides AMP analytics.

Namespace

Drupal\analytics_amp\Plugin\AnalyticsService

Code

public function getOutput() {
  if (\Drupal::service('router.amp_context')
    ->isAmpRoute()) {
    return $this
      ->getAmpOutput($this->configuration);
  }
}