From ad082fc2685cb48f779a715fa4c8d05ac889a4c2 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Mon, 21 Mar 2016 09:19:20 -0400 Subject: [PATCH] Configure TrackJS with userId Otherwise, all we get in TrackJS are "anonymous" users, without a way to link them to Mixpanel users. --- lib/browser/modules/analytics.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/browser/modules/analytics.js b/lib/browser/modules/analytics.js index 4695aab9..60376165 100644 --- a/lib/browser/modules/analytics.js +++ b/lib/browser/modules/analytics.js @@ -55,6 +55,13 @@ analytics.config(function($mixpanelProvider) { // TrackJS integration // http://docs.trackjs.com/tracker/framework-integrations + +analytics.run(function($window) { + $window.trackJs.configure({ + userId: username.sync() + }); +}); + analytics.config(function($provide) { $provide.decorator('$exceptionHandler', function($delegate, $window, $injector) { return function(exception, cause) {