From f8ce7c229292c2f0683fd2cc2917799810e4dce5 Mon Sep 17 00:00:00 2001 From: Sabe Jones Date: Mon, 7 Sep 2015 22:23:42 -0400 Subject: [PATCH] fix(analytics): Track modals correctly Fixes #5879. --- website/public/js/controllers/rootCtrl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/public/js/controllers/rootCtrl.js b/website/public/js/controllers/rootCtrl.js index 46f0682f74..0e6fd743c7 100644 --- a/website/public/js/controllers/rootCtrl.js +++ b/website/public/js/controllers/rootCtrl.js @@ -124,7 +124,7 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$ // Otherwise use the proper $modal.open $rootScope.openModal = function(template, options){//controller, scope, keyboard, backdrop){ if (!options) options = {}; - if (options.track) Analytics.track(_.merge(options.track,{'hitType':'event','eventCategory':'button','eventAction':'click'})); + if (options.track) Analytics.track({'hitType':'event','eventCategory':'button','eventAction':'click','eventLabel':options.track}); if(template === 'newStuff') return forceLoadBailey(template, options); return $modal.open({ templateUrl: 'modals/' + template + '.html',