appfeel / analytics-google-adid

Enable iOS IDFA collection on Google Analytics (combine with appfeel/analytics-cordova)
MIT License
11 stars 5 forks source link

Google Analytics Plugin

This plugin depends on com.analytics.google. Cordova (PhoneGap) 3.0+ Plugin to connect to Google Analytics native SDK. Enables advertising id collection (IDFA) to get enhanced analytics (Demographics and Interests).

iOS CAUTION: Ensure to check advertising id option when you publish your app. Otherwise it will be rejected.

Prerequisites:


Platform SDK supported


Quick start

To install this plugin, follow the Command-line Interface Guide. You can use one of the following command lines:

Make sure to review the Google Analytics terms and SDK Policy


Javascript API

Note: All success callbacks are in the form 'function () {}', and all failure callbacks are in the form 'function (err) {}' where err is a String explaining the error reason.

Start Google Analytics

startAdIdTrackerWithId(id, success, fail);

Start Analtytics tracker with advertising id collection enabled:

Advertising id

getAdId(success, error);

Gets the advertising id (IDFA).