Calling Angulartics functions gives error

285 Views Asked by At

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.

1

There are 1 best solutions below

0
On

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); .... }]);