I am using AnguleJS UI Router and revolunet / angular -google-analytics https://github.com/revolunet/angular-google-analytics
Here is my configuration:
.config(function(AnalyticsProvider) { // initial configuration AnalyticsProvider.setAccount('UA-XXXXXXX-X'); // track all routes/states (or not) AnalyticsProvider.trackPages(true); // Use analytics.js instead of ga.js AnalyticsProvider.useAnalytics(true); // change page event name AnalyticsProvider.setPageEvent('$stateChangeSuccess'); }))
Are there any other steps now? I have NOT modified any states / controllers to include any analytics code, is there anything else? And what does the following comment mean? I think the inclusion of "trackPages" is enough, am I right?
.run(function(Analytics) {
angularjs google-analytics
Omranic
source share