public function Piwik::getOutput in Analytics 8
Returns the output of the analytics service.
Return value
array A structured, renderable array.
Overrides ServicePluginBase::getOutput
File
- analytics_piwik/
src/ Plugin/ AnalyticsService/ Piwik.php, line 71
Class
- Piwik
- Analytics service type.
Namespace
Drupal\analytics_piwik\Plugin\AnalyticsServiceCode
public function getOutput() {
$output = [];
// This is just placeholder code.
$output['analytics_' . $this
->getServiceId()] = [
'#type' => 'html_tag',
'#tag' => 'piwik',
'#attributes' => [
'src' => $this->configuration['url'],
'site_id' => $this->configuration['id'],
],
];
return $output;
}