docs(google-analytics): add usage

closes #883
This commit is contained in:
Ibby 2016-12-27 08:07:45 -05:00
parent 44fe04bbbd
commit 46a9b6d50d

View File

@ -10,6 +10,20 @@ declare var window;
* - A Cordova 3.0+ project for iOS and/or Android
* - A Mobile App property through the Google Analytics Admin Console
* - (Android) Google Play Services SDK installed via [Android SDK Manager](https://developer.android.com/sdk/installing/adding-packages.html)
* @usage
* ```typescript
* import { GoogleAnalytics } from 'ionic-native';
*
* GoogleAnalytics.startTrackerWithId('YOUR_TRACKER_ID')
* .then(() => {
* console.log('Google analytics is ready now');
* // Tracker is ready
* // You can now track pages or set additional information such as AppVersion or UserId
* })
* .catch(e => console.log('Error starting GoogleAnalytics', e));
*
*
* ```
*/
@Plugin({
pluginName: 'GoogleAnalytics',