diff --git a/modules/analyze_google_analytics/src/Plugin/Analyze/GoogleAnalytics.php b/modules/analyze_google_analytics/src/Plugin/Analyze/GoogleAnalytics.php index 4a07421..01b428b 100644 --- a/modules/analyze_google_analytics/src/Plugin/Analyze/GoogleAnalytics.php +++ b/modules/analyze_google_analytics/src/Plugin/Analyze/GoogleAnalytics.php @@ -141,8 +141,8 @@ public function renderFullReport(EntityInterface $entity): array { if (strpos($key, '_') === 0 || $key === 'index') { continue; } - // Transform snake_case to human readable. - $label = ucwords(str_replace('_', ' ', $key)); + // Transform every capital letter to a space and the letter. + $label = ucwords(strtolower(preg_replace('/(?