diff --git a/public/internal/500.php b/public/internal/500.php
index 75221aaa3a0eecc4ec1cd6f75cf607bc60c41441..95a847a4d45141192e573293f0be247941fe2087 100644
--- a/public/internal/500.php
+++ b/public/internal/500.php
@@ -1,6 +1,15 @@
 <?php
+
 function getError500()
 {
+    include "config.php";
+
+    if (strpos($_SERVER['HTTP_HOST'], '.onion') !== false) {
+        $trackURL = $trackURLTor;
+    } else {
+        $trackURL = $trackURLNormal;
+    }
+
     return <<<EOF
     <!DOCTYPE html>
     <html lang="en">
@@ -13,7 +22,7 @@ function getError500()
        </head>
        <body>
           <!-- Matomo Image Tracker-->
-          <img src="https://matomo.jonasled.de/matomo.php?idsite=1&amp;rec=1" style="border:0" alt="" />
+          <img src="$trackURL" style="border:0" alt="" />
           <!-- End Matomo -->
           <div id="particles-js"></div>
           <div class="terminal-window">