The mobile app market became really competitive in the last year, as a recent TechCrunch article stated. The costs for visibility in a market with hundred of thousands of competitors is increasing steadily. The marketing costs for one successful install (cost-per-install, or short CPI) of your app is on the rise. According to recent numbers by W3i the marketing cost for an installed Android app in June 2012 has risen from $0.30 to $0.51. On iOS the CPI has increased from $0.59 to $0.92.
As a matter of fact, it is of crucial importance for app developers and publishers to track and analyze their successfully installed apps. Since most platform SDKs do not support rich app tracking and analysis, several vendors offer additional technologies and services, such as Google Analytics SDK for Android apps or Localytics. These technologies allow the real-time collection and analysis of user engagement data, such as active installs, location information, feature usage or in-app purchases. As an additional benefit, Google Analytics SDK for Android allows the seamless integration of native app tracking into your familiar Google Analytics dashboard. This integration also gives publishers the tools to monitor the success of their mobile marketing campaigns in combination with their Web engagements. For app publishers this technologies provide a powerful platform to measure and optimize all application marketing efforts.
Within this tutorial we will describe the stepwise process of integrating Google Analytics tracking into a native Android application.
Step 1: Download Google Analytics Android SDK
In a first step download the Google Analytics Android SDK. This SDK contains a libGoogleAnalytics.jar that you have to copy into your /libs/ folder of your Android project. In order to track the user activities within your Analytics dashboard it is necessary to add following permissions to your already existing AndroidManifest.xml file:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Step 2: Create Analytics Tracking ID
Before you can track the activity of your users within the Analytics dashboard you have to set up a new Web tracking property ID (of course this is not a Web site, but will refer to the stats for your mobile application).
A Web property ID is also known as the UA number of your tracking code and looks like
UA-xxxxx-yy
, where the x’s and y’s indicate the unique numbers for your profile. You must indicate the web property ID you’d like to use when instantiating the tracking object. See Web Property for more information.
Step 3: Integrate Analytics Tracker into Android App
Integrate Google Analytics Tracker SDK into your Android app by accessing the tracker singleton as follows (Don’t forget to change my Analytics Tracking ID by your own ID):
package at.smartlab.androidbook.testandroidtracking; import com.google.android.apps.analytics.GoogleAnalyticsTracker; import android.app.Activity; import android.os.Bundle; public class TestAndroidTrackingActivity extends Activity { GoogleAnalyticsTracker tracker; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); tracker = GoogleAnalyticsTracker.getInstance(); tracker.setDebug(true); // Start the tracker (REPLACE my Analytics id with your own ID!! tracker.startNewSession("UA-8874494-2", this); tracker.trackEvent( "Clicks", // Category "Button", // Action "clicked", // Label 77); // Value tracker.trackPageView("/testApplicationHomeScreen"); tracker.dispatch(); } @Override protected void onStop() { super.onStop(); // Stop the tracker when it is no longer needed. tracker.stopSession(); } }
Step 4: Track Application Installs
Track your application installs in detail by adding following receiver in your AndroidManifest.xml file:
<!-- Used for install referrer tracking --> <receiver android:name="com.google.android.apps.analytics.AnalyticsReceiver" android:exported="true"> <intent-filter> <action android:name="com.android.vending.INSTALL_REFERRER" /> </intent-filter> </receiver>
Alternative: Localytics

Localytics is built for mobile & tablet apps. Integration is easy, takes just 10 minutes and requires only a few lines of code. A quick integration allows you to track all standard metrics such as platform, device type, sessions and unique users. Event and screen tracking are used to analyze conversion funnels, screen flows, feature usage, content access, advertising performance, etc. Full support for iOS, Android, BlackBerry, Windows Phone and HTML5 apps.
Localytics is designed to measure apps, providing the greatest possible accuracy and lightest footprint. Applications are different than websites, offering richer experiences and a deeper integration with the device. Apps function offline, survive intermittent network connectivity, support multitasking and access location services, storage, accelerometers, network details and more. Localytics collects and combines rich data to help you build more successful applications.
I do not even know how I ended up here, but I thought this post was great.
I do not know who you are but certainly you’re going to a famous
blogger if you are not already 😉 Cheers!
Why people still make use of to read news papers when in this technological globe everything is existing on web?
I just couldn’t depart your web site prior to suggesting that I really
enjoyed the usual info an individual supply to your guests?
Is gonna be again steadily in order to inspect new posts
It’s a shame you don’t have a donate button! I’d certainly donate to this outstanding
blog! I guess for now i’ll settle for book-marking and adding your RSS feed to
my Google account. I look forward to new updates and will talk about this blog with my Facebook group.
Chat soon!
magnificent put up, very informative. I wonder why the other
specialists of this sector don’t realize this. You must
proceed your writing. I’m sure, you have a great
readers’ base already!