Google Analytics
The same powerful features provided by Google Analytics for website administrators and marketing can be used to track your app. The next example shows how to integrate Google Analytics into your app.
This example uses the JavaScript library originally developed by Roger Chapman. The library stores analytics events in a database on the device until a network connection is available when it sends the stored events to Google. The interval between sending events is configurable and should be set to at least half a minute to avoid excessive network consumption.