public function GoogleTagManager::defaultData in Analytics 8
Return value
array
Overrides ServiceDataTrait::defaultData
File
- src/
Plugin/ AnalyticsService/ GoogleTagManager.php, line 157
Class
- GoogleTagManager
- Google Tag Manager analytics service plugin.
Namespace
Drupal\analytics\Plugin\AnalyticsServiceCode
public function defaultData() {
if (!empty($this->configuration['data_layer']['value'])) {
return json_decode($this->configuration['data_layer']['value'], TRUE) ?? [];
}
else {
return [];
}
}