]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/piwik.js
Add bootstrap_form formbuilder gem
[rails.git] / app / assets / javascripts / piwik.js
index a48e903add43ee638029805e80323307b20fc596..5353a99ac199609cd763903e953083625501cdc0 100644 (file)
@@ -9,10 +9,14 @@ if (OSM.PIWIK) {
       cache: true,
       success: function () {
         piwikTracker = Piwik.getTracker(base + "piwik.php", OSM.PIWIK.site);
-      
+
+        if (OSM.user) {
+          piwikTracker.setUserId(OSM.user.toString());
+        }
+
         piwikTracker.trackPageView();
         piwikTracker.enableLinkTracking();
-      
+
         $("meta[name=piwik-goal]").each(function () {
           piwikTracker.trackGoal($(this).attr("content"));
         });