public function GoogleAnalyticsAccounts::getDefaultMeasurementId in Google Analytics 4.x
1 call to GoogleAnalyticsAccounts::getDefaultMeasurementId()
File
- src/
Helpers/ GoogleAnalyticsAccounts.php, line 70
Class
Namespace
Drupal\google_analytics\HelpersCode
public function getDefaultMeasurementId() {
// The top UA- or G- Account is the default measurement ID.
foreach ($this->accounts as $account) {
if (preg_match(self::GOOGLE_ANALYTICS_TRACKING_MATCH, $account)) {
return $account;
}
}
}