diff --git a/packages/matomo/src/matomo.js b/packages/matomo/src/matomo.js
index 6365082f6a428277bd93ff0268a0e27dea3c5531..4e69ec6d4cdc5d64ceb97e02ffc73f3b7153c467 100644
--- a/packages/matomo/src/matomo.js
+++ b/packages/matomo/src/matomo.js
@@ -41,6 +41,14 @@ export class MatomoElement extends DBPLitElement {
 
     setupMatomo(loggedIn) {
         if (loggedIn && ! this.isRunning) {
+            if (this.siteId === -1) {
+                console.log('site id missing, skipping matomo...');
+                return;
+            }
+            if (this.endpoint === '') {
+                console.log('endpoint missing, skipping matomo...');
+                return;
+            }
             console.log('add matomo...');
 
             window._paq = window._paq || [];