luisfarzati/angulartics — pull request #259 by emaV (2014-12-16 14:57:03+00:00)
Title: ADD support for Cordova google-analytics-plugin

Currently only the GAPlugin for Cordova/Phonegap (https://github.com/phonegap-build/GAPlugin) is supported (#60 thanks to @mlegenhausen).

This plugin provides an integration of the google-analytics-plugin for Cordova/Phonegap: https://github.com/danwilson/google-analytics-plugin

Usage example:

Before you can start using you need to install the google-analytics-plugin for your platform. The instructions can be found on the homepage.

Then add the plugin file to your index.html file:

Now add the module to your app configuration.

angular.module('app', ['angulartics', 'angulartics.google.analytics.cordova']);

Then configure the plugin via:

.config('googleAnalyticsCordovaProvider', function (googleAnalyticsCordovaProvider) {
googleAnalyticsCordovaProvider.trackingId = 'XXX';
googleAnalyticsCordovaProvider.debug = true; // default: false
})

That's it you now have mobile google analytics running in your app.

Feedback is welcome!