]> git.openstreetmap.org Git - rails.git/commitdiff
Only send user IDs to matomo when configured to do so
authorTom Hughes <tom@compton.nu>
Sun, 4 Dec 2022 18:54:07 +0000 (18:54 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 4 Dec 2022 18:54:07 +0000 (18:54 +0000)
app/assets/javascripts/matomo.js

index 34af54ce776278617bed471c776ee89b966805b8..f259b135808c1ff0f9760636b5605f27ded9f7a6 100644 (file)
@@ -10,7 +10,7 @@ if (OSM.MATOMO) {
       success: function () {
         matomoTracker = Matomo.getTracker(base + "matomo.php", OSM.MATOMO.site);
 
-        if (OSM.user) {
+        if (OSM.user && OSM.MATOMO.set_user) {
           matomoTracker.setUserId(OSM.user.toString());
         }