I want to use angulartics. I have added "angulartics" and "angulartics.google.analytics" But when I call $analyticsProvider.firstPageview(true); from my config function in app.js it gives me error.
Asked
Active
Viewed 247 times
-1
-
have you included angulartics-ga.js too? – YOU Jun 20 '15 at 12:21
-
Yes I have included both "angulartics.min.js" and "angulartics-ga.min.js" from https://github.com/luisfarzati/angulartics/tree/master/dist but I couldn't find "ga('send', 'pageview'); " in the code and calling $analyticsProvider.firstPageview(true); $analyticsProvider.withAutoBase(true); from my app.js gives an error – twitch Jun 20 '15 at 17:36
1 Answers
0
Solved it I had to add it as a name variable as well
myApp.config(['$routeProvider','$analyticsProvider', function($routeProvider,$analyticsProvider){ $analyticsProvider.firstPageview(true); $analyticsProvider.withAutoBase(true); .... }]);

twitch
- 225
- 1
- 13