X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/b394a4d309794d719ebe5e77fc69d2a8411aa161..796fde85292ed049f190c2f818c1b55b2cc1971d:/app/assets/javascripts/piwik.js diff --git a/app/assets/javascripts/piwik.js b/app/assets/javascripts/piwik.js index a48e903ad..5353a99ac 100644 --- a/app/assets/javascripts/piwik.js +++ b/app/assets/javascripts/piwik.js @@ -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")); });