From: Tom Hughes Date: Sun, 4 Dec 2022 18:54:07 +0000 (+0000) Subject: Only send user IDs to matomo when configured to do so X-Git-Tag: live~1475 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/007e1b26cd293686ab6236750db41bd5fb1cf5a1 Only send user IDs to matomo when configured to do so --- diff --git a/app/assets/javascripts/matomo.js b/app/assets/javascripts/matomo.js index 34af54ce7..f259b1358 100644 --- a/app/assets/javascripts/matomo.js +++ b/app/assets/javascripts/matomo.js @@ -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()); }