ga things

This commit is contained in:
nelsonlaquet 2013-09-01 06:45:56 -05:00
parent 4339d89dc6
commit 523f4eee9f

View file

@ -100,11 +100,10 @@
]).factory('AngularyticsGoogleUniversalHandler', function () {
var service = {};
service.trackPageView = function (url) {
ga('set', 'page', url);
ga('send', 'pageview', url);
window._gaq.push(['_trackPageview', url]);
};
service.trackEvent = function (category, action, opt_label, opt_value, opt_noninteraction) {
ga('send', 'event', category, action, opt_label, opt_value, { 'nonInteraction': opt_noninteraction });
window.ga('send', 'event', category, action, opt_label, opt_value, { 'nonInteraction': opt_noninteraction });
};
return service;
});