Analyze and Track Market of Mobile Android Apps with Google Analytics

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. Applied Artificial Intelligence Kinde ebook

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).

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

screenshot from: www.localytics.com

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.

 


21 comments

Leave a Reply

Your email address will not be published. Required fields are marked *