feat(analytics): call service from app

This commit is contained in:
Sabe Jones
2015-06-22 16:35:17 -05:00
parent 83e0eb374f
commit 2ce1daffb8
12 changed files with 51 additions and 75 deletions

View File

@@ -22,10 +22,10 @@ window.habitrpg = angular.module('habitrpg', ['chieffancypants.loadingBar', 'ui.
$scope.Math = window.Math;
}])
.controller("PlansCtrl", ['$rootScope',
function($rootScope) {
.controller("PlansCtrl", ['$rootScope','Analytics',
function($rootScope,Analytics) {
$rootScope.clickContact = function(){
window.ga && ga('send', 'event', 'button', 'click', 'Contact Us (Plans)');
Analytics.track({'hitType':'event','eventCategory':'button','eventAction':'click','eventLabel':'Contact Us (Plans)'})
}
}
])