diff --git a/src/Helpers/GoogleAnalyticsAccounts.php b/src/Helpers/GoogleAnalyticsAccounts.php
index b49285847a67a159f87d9be8f071c51a14bbbc55..de17bc1ce3105948851fe949ea57d912ec64f574 100644
--- a/src/Helpers/GoogleAnalyticsAccounts.php
+++ b/src/Helpers/GoogleAnalyticsAccounts.php
@@ -46,7 +46,10 @@ class GoogleAnalyticsAccounts {
     $accounts = $this->config->get('account') ?? '';
     // Create the accounts array from either a single gtag id or multiple ones.
     if (strpos($accounts, ',') === FALSE) {
-      $this->accounts[] = new GaAccount($accounts);
+      // Only fill the accounts array if an account exists in config.
+      if ($accounts !== '') {
+        $this->accounts[] = new GaAccount($accounts);
+      }
     }
     else {
       $accounts_array = explode(',', $accounts ?? '');