images

Mobile Apps Integrations

Google Analytics provides a mobile app measurement platform that empowers app owners, marketers, and developers to analyze user interaction on both Android and iOS, allowing a better understanding of user engagement with apps. The platform can provide insightful information, such as device types and brands, time spent on screens, crashes and exceptions, in-app purchases, and others.

However, unlike with the web, user acquisition does not happen through the app itself. It happens through one of the available app markets, mainly Google Play and iTunes. This means that app developers have less control over marketing measurement. That's why Google Analytics developed integrations for both markets, so that app owners, marketers, and developers can better measure campaign performance and link this information to post-installation interactions. The information acquired through these integrations will enable you to optimize campaigns not only for installs, but also for actual purchases and other meaningful metrics.

In this chapter, you learn how to set up the Google Analytics' install tracking feature for both Android and iOS, which will populate the acquisition sources and the Google Play Referral Flow reports in Google Analytics. You also learn techniques that will help you better understand the reports and extract insights from them.

Viewing Google Play and iTunes Data on Google Analytics

The steps for setting up install tracking are different for Android and iOS, but they are both relatively straightforward, requiring few code changes. The following sections include a step-by-step guide for each of them. Note that this guide refers to version 4 of the Android SDK and version 3 of the iOS SDK. If you don't know which version you are using, ask your developer. You can download the Android SDK from http://goo.gl/mpF073 and the iOS SDK from http://goo.gl/wmZfni.

But before you begin, it is important you make sure you are measuring your customers' interactions properly, so that you not only have the SDK running, but you also have your business questions answered. This will allow you to link the data you get from Google Play and iTunes in a more meaningful way. Following is a list of important questions you might want to answer; you can find the necessary code to implement them at http://goo.gl/Hlt2yC.

  • What actions are my users performing?
  • How much money are users spending in my app?
  • Are users completing my app objectives?
  • How do users with a specific trait behave?
  • How long does it take for a user to accomplish a task?

In order to make use of the Mobile App measurement platform and the integrations discussed in this chapter, you will need to set up an App View. When you set up a Property, you will be prompted to set up an App View; select this option. This allows you to see your app data in reports that best reflect the app experience. If you want to take advantage of the integrations discussed here (and other app-only features), you will need to choose the app option.

If you want your data captured both in an app-specific view as well as a view that captures both app and web, send your data to two different properties—the one that houses just app data and the one that houses all data. Alternatively, you can make use of the rollup property (a feature available in Google Analytics Premium) to roll all your data up to one place. You can read more about it at http://goo.gl/V74xx1.

It is important to note that if you combine website and app analytics data, you should use the User ID feature (discussed in-depth in Part II of the book). This will allow you to see cross-device performance in relation to your website and app in a single view. If you choose this solution, you will be able to filter out web and app hits into separate views for better analyses, as shown at http://goo.gl/9e8SkO.

NOTE I warmly recommend that you check out the Mobile App Analytics Fundamentals course at the Analytics Academy. It will provide you with a strong foundation and help you succeed with mobile app measurement. You can find the course at http://goo.gl/Ts9SKB.

Android SDK v4: Setting Up Install Tracking and Campaign Measurement

The process of setting up Install Tracking and Campaign Measurement is straightforward, and even though they can be implemented independently, it is highly recommended that you implement both of them, as they have a highly synergetic nature. Install Tracking enables you to view app data from Google Play in your Google Analytics Property, while Campaign Measurement makes your Acquisition more accurate and complete. Both are extremely important.

The following four steps are discussed in this section:

  1. Link your Apps to your Google Analytics property.
  2. Update your AndroidManifest.xml file.
  3. Add campaign parameters to your Google Play links.
  4. Customize the Android SDK to General Campaign Tracking and Traffic Source Attribution.

Step 1: Link Your Apps to Your Google Analytics Property

The first step necessary to get Google Play data into Google Analytics is to link your apps to your Google Analytics property in the Admin section of your account. To do that, log in to your account and click on Admin at the top of your screen. Then choose the property that you want to link to your app (since the linking is at the property level, all views in the property will show this data) and click on Property Settings. You will see a control similar to Figure 4-1.

images

Figure 4-1: Linking control for Android SDK

Once you turn it on, you can choose which of your apps you would like to link to Google Analytics. Only someone with Edit permission in Google Analytics who uses the same email address in the Play Developer Console can proceed to link the accounts. If that's the case, you will be given a list of apps, similar to the one in Figure 4-2. Choose the app(s) you want to link to your Google Analytics property.

images

Figure 4-2: App selection from Google Play

NOTE Figure 4-2 was kindly provided by JiaJing Wang, Software Engineer at Google. You might want to try this game—it is quite fun! Visit http://goo.gl/d030VM.

Step 2: Update Your AndroidManifest.xml File

Once the Google Analytics settings are out of your way, you need to update a few lines of code in your AndroidManifest.xml file. This code will add a BroadcastReceiver to your app so that it can receive and set the campaign information contained in the referral link (discussed later in this chapter). The code follows, but you can copy/paste it from the following link http://goo.gl/9T9lrK:

<!-- Used for Google Play Store Campaign Measurement-->;
<service
  android:name="com.google.android.gms.analytics.CampaignTrackingService" />
<receiver
  android:name="com.google.android.gms.analytics.CampaignTrackingReceiver"
  android:exported="true">
 <intent-filter>
   <action android:name="com.android.vending.INSTALL_REFERRER" />
 </intent-filter>
</receiver>

Step 3: Add Campaign Parameters to Your Google Play Links

You learned about campaign tagging best practices using UTM parameters in Chapter 1, “Implementation Best Practices,” and the same principles apply for Android apps. You should always have campaign parameters when sending potential customers to Google Play; well, except when you are sending them through Google AdWords, in which case you should only enable Auto Tagging. But in addition to the URL parameters discussed in Chapter 1, you will need to add the package name.

I usually recommend using the Google Play URL Builder (Figure 4-3) to build links for campaigns; you can find it at http://goo.gl/I3rTnI.

images

Figure 4-3: Google Play URL Builder

However, for companies advertising through dozens or hundreds of different campaigns and networks, it might become unrealistic to build one URL at a time. In such cases, I recommend using a spreadsheet template where you have all the parameters' values and a concatenate function that creates the final link. Figure 4-4 shows a sample spreadsheet. You can download a template from http://goo.gl/C05tdu, a solution developed by Cardinal Path, a Google Analytics Certified Partner and Google Analytics Premium reseller. (You need to be signed in to a Google account in order for this link to work.)

images

Figure 4-4: Google Play URL Builder spreadsheet

Step 4: Customize the Android SDK to General Campaign Tracking and Traffic Source Attribution

The previous steps discussed ways to attribute the source of users coming to Google Play right before installing your app (such as for new users). While this information is critical in order to measure campaign success, you also want to capture the traffic sources for subsequent user sessions. This will enable you to understand how well your retention marketing is working.

In order to capture traffic sources for users who land directly in your app, you need to tag your links as described in Step 3, so that Google Analytics understands where the user is coming from. In addition to that, you need to set the campaign parameters on your tracker through the setCampaignParamsFromUrl method, as exemplified here (source http://goo.gl/bCvzpg):

// Get tracker.
Tracker
  t = ((AnalyticsSampleApp) getActivity().getApplication()).getTracker(
  TrackerName.APP_TRACKER);
// Set screen name.
t.setScreenName(screenName);

// In this example, campaign information is set using
// an url string with Google Analytics campaign parameters.
// Note: This is for illustrative purposes. In most cases campaign
// information would come from an incoming Intent.
String campaignData = "http://examplepetstore.com/index.html?" +
"utm_source=email&utm_medium=email_marketing&utm_campaign=summer" +
"&utm_content=email_variation_1";

// Campaign data sent with this hit.
t.send(new HitBuilders.ScreenViewBuilder()
      .setCampaignParamsFromUrl(campaignData)
      .build()
      );

iOS SDK v3: Setting Up Install Tracking and Campaign Measurement

One important note regarding iOS data is that a user must download, install, and launch an app in order for the referring source data to appear in the reports. This means that if 1,000 users come from a campaign to your iTunes description page, 600 end up installing it, and 500 hundred end up launching it, you will see the 500 hundred attributed to the campaign. You won't see data for the remaining 500 hundred.

The same note mentioned in the previous section about Android Install Tracking and Campaign Measurement importance also applies to iOS; they are both extremely important. Below are the four steps discussed in this section:

  1. Enable iOS Campaign Tracking in Your Google Analytics property.
  2. Add the libAdIdAccess.a library to your XCode project.
  3. Add campaign parameters to your links to iTunes.
  4. Customize the iOS SDK to General Campaign Tracking and Traffic Source Attribution.

Step 1: Enable iOS Campaign Tracking in Your Google Analytics Property

The first step necessary to get iTunes data into Google Analytics is to enable the campaign-tracking features for your Google Analytics property in the Admin section of your account. To do that, log in to your account and click on Admin at the top of your screen. Then choose the property that you want to link to your app (since the linking is at the property level, all views in the property will show this data) and click on Property Settings. You will see a snippet similar to Figure 4-5. Turn campaign tracking on and proceed to Step 2.

images

Figure 4-5: Linking control for iOS campaign tracking

Step 2: Add the libAdIdAccess.a Library to Your XCode Project

There is only one code change required for app developers to set up install tracking for iOS, which will allow access to the iOS identifier for advertising (IDFA). To enable IDFA collection, link the related files and set the allowIDFACollection property to YES on each tracker that will collect the IDFA. Here is the line of code to be added:

// Enable IDFA collection.

tracker.allowIDFACollection = YES;

Refer to the README file in the SDK for more information.

Step 3: Add Campaign Parameters to Your Links to iTunes

This step is very similar to Google Play's instructions for Android as described in Step 3 in the previous section. The only difference is that iOS links will require additional parameters: Google Analytics Property ID, Ad Network, and Redirect URL. You can find the iOS Campaign Tracking URL Builder (see Figure 4-6) at http://goo.gl/Arg8tw.

images

Figure 4-6: iOS Campaign Tracking URL Builder

Step 4: Customize the iOS SDK to General Campaign Tracking and Traffic Source Attribution

Similarly to the process described for Google Play (Step 4 from the previous section), in order to capture traffic sources for users who land directly in your app (after installing it, in subsequent sessions), you will still need to tag your links as described in Step 3 so that Google Analytics understands where the user comes from. In addition to that, you also need to use [GAIDictionaryBuildersetCampaignParametersFromUrl:urlString], where urlString is a string representing an URL that may contain Google Analytics campaign parameters. Here is an example of how to do it (for the source, go to http://goo.gl/KHVs17):

/*
* MyAppDelegate.m
*
* An example of how to implement campaign and referral attribution. If no
* Google Analytics campaign parameters are set in the referring URL, use the
* hostname as a referrer instead.
*/

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *) url {

NSString *urlString = [url absoluteString];

id<GAITracker> tracker = [[GAI sharedInstance]
  trackerWithName:@"tracker" trackingId:@"UA-XXXX-Y"];

// setCampaignParametersFromUrl: parses Google Analytics campaign
// ("UTM")parameters from a string url into a Map that can be set on a Tracker.

GAIDictionaryBuilder *hitParams = [[GAIDictionaryBuilder alloc] init];

// Set campaign data on the map, not the tracker directly because it only needs
// to be sent once.

[[hitParams setCampaignParametersFromUrl:urlString] build];

// Campaign source is the only required campaign field. If previous call did
// not set a campaign source, use the hostname as a referrer instead.

if(![hitParams valueForKey:kGAICampaignSource] && [url host].length !=0) {

// Set campaign data on the map, not the tracker.

[hitParams set:kGAICampaignMedium value:@"referrer"];
[hitParams set:kGAICampaignSource value:[url host]];
 }

[tracker send:[[[GAIDictionaryBuilder createAppView] setAll:hitParams] build]];

APP TRAFFIC SOURCE ATTRIBUTION

When you finish the integration (either Android or iOS), you will be able to see the sources of your acquisition campaigns and subsequent app sessions. Awesome. However, there remains one important question: how does Google Analytics attribute a source to a session? There are four possible ways for a user to reach an app, but only two outcomes when it comes to the way the source attribution behaves.

  • The user opens the app without clicking on an external link: the current session will be attributed to the original source.
  • The user clicks on an external link that does not include the campaign parameters (explained in Step 3 in the previous section): the current session will be attributed to the original source.
  • The user clicks on an external link that includes the campaign parameters but the SDK was not modified to capture those links (as explained in Step 4 in the previous section): the current session will be attributed to the original source.
  • The user clicks on an external link that includes the campaign parameters and the SDK was modified to capture campaign information (as explained in Step 4 in the previous section): The original campaign values will be overwritten and the current session will be attributed to the new source.

In case the user downloads the app again, it will actually be a new user with a new client ID, so the new source will depend on whether there are campaign parameters and whether the SDK was modified to capture the campaign information.

Analyzing Mobile Apps—The Full Customer Journey

Now that you have all the data coming in, you can start analyzing your users' interactions and extracting insights to drive your business forward. In the following examples, I use the Google Play reports for two main reasons: (1) I have a better Google Play dataset and (2) The Referral Flow report is available only for Google Play.

The setup you went through in the previous section will bring additional data to the following reports in your app analytics account:

  • Sources reports: This set of reports will show you where users who downloaded, installed, and launched your app come from. It will also provide metrics about how they behave and interact with your app.
  • Google Play Referral Flow report: This report will show you the flow from Google Play views to installations to app launches—the full cycle.

In the next sections, you learn more about each of the reports and how to use them.

Sources Reports

As shown in Figure 4-7, the default app sources report includes a line chart showing the trend for the New Users metric; it also shows a list of all the Source/Medium pairs that brought traffic to your app, sorted by number of new users. If you are interested only in Google Play or iTunes, you will find out-of-the-box reports for each in the left navigation sidebar.

images

Figure 4-7: Default Sources report

The default Sources will show the App Acquisition trend in a glimpse. However, it is also possible to choose a different group of metrics to be shown by clicking on an item in the metric group selector (links beneath the Explorer tab in the report). Using those metrics, you will be able to pivot your analysis to see how traffic from each source engaged with the app. As you learned in Chapter 1, defining goals in your Google Analytics account is critical, and this report is one of the many that will provide great benefit when your goals are configured.

If you are interested in analyzing acquisition along with behavior and conversion data, I recommend creating a custom report using similar metrics/dimensions as the ones shown in Figure 4-8. This example custom report can be imported to your account by following this link: http://goo.gl/ptbQLb.

images

Figure 4-8: Acquisition, Behavior, and Conversion table

Figure 4-9 shows the Custom Report mentioned above in action. Here are a few topics you might want to focus on when looking at this table:

  • For each source, examine the percentages inside the parentheses (columns 2–5) and compare them. If you notice big differences, it may be worth investigating further. For example, the source “google” (second row) represents 5.95% of all users who visited the app; however, it represents 6.45% of all new users, 7.54% of all sessions, and 8.71% of all hits. This means that, in this case, “google” is bringing users who are returning more often (higher percentage of sessions) and are more engaged (higher percentage of hits, which is the sum of all interactions in the app).
  • For each metric in columns 6–9, compare all sources to understand how they differ in terms of engagement and conversions. For example, when comparing Goal Conversion Rate (last column) for all sources, you learn that “google” has a higher rate than all others in this table.

NOTE This report can be edited by clicking on Edit just below the report title. This might be important if your company uses a different set of metrics to analyze acquisition, behavior, and conversions.

images

Figure 4-9: Analyzing Acquisition performance.

Another interesting way to analyze the data is to compare the performance of different mobile devices for each traffic source. In Figure 4-10 you will find such a comparison, where you can see the top three devices for traffic source “google” and how they compare to the average goal conversion rate of the app. In order to see the same report in your account, log in to your Google Analytics Account and find the Sources report under the Acquisition tab on the left sidebar; then click All and choose your settings based on the explanation below (also shown in Figure 4-10).

  1. Primary dimension: The main dimension you want to analyze.
  2. Secondary dimension: The dimension that will be used to segment your primary dimension.
  3. Filter: Filters the table to show only one or more elements of the primary dimension.
  4. Chart Type: There are several ways to visualize Google Analytics data; the visualization chosen in Figure 4-10 is the fourth icon starting from left, which is the Comparison chart.
  5. Sorting Metric: Defines the order in which the primary dimension is sorted.
  6. Comparison Metric: Defines which metric will be used to compare to the website average (the metrics available will depend on which metric group you have selected above the line chart).

images

Figure 4-10: Comparing mobile device model performance

Note that this report can also be segmented using the Google Analytics segment builder, which means you can build custom segments to analyze your user acquisition in more detail. Learn more about segments in Google Analytics at http://goo.gl/1IrUjV.

Google Play Referral Flow Report

The Google Play Referral Flow is an extremely insightful report in that it is the only way to see the full user journey, from the moment users see the app description on Google Play until the first time they open the app.

In Figure 4-11 you can see the default report, which includes a flow visualization on the top and a table in the bottom, both showing the same data. The visualization will help you understand the overall trend at a glimpse, while the table will help you drill down into the actual behavior by each source.

images

Figure 4-11: Google Play Referral Flow report

A good way to use the table in Figure 4-10 is to look at the percentages in the parentheses and analyze their changes, both per row and per column:

  • In-row analysis: Analyzing the percentages of each step for every source will provide a quick funnel analysis showing which steps are not working for each of the sources.
  • In-column analysis: Comparing percentages for each of the columns will show which sources are performing the best for each of the steps.

Summary

In this chapter you learned about the possible ways to bring Google Play and iTunes data into Google Analytics. As you have seen, the end result of the integrations will be a deeper understanding of acquisition campaigns (for both Google Play and iTunes) and the full customer journey (Google Play only). The reports that will show the data from the integrations are as follows:

  • Sources reports: This set of reports will show you where users who downloaded, installed, and launched your app come from. It will also provide metrics about how they behave and interact with your app.
  • Google Play Referral Flow report: This report will show you the flow from Google Play views to installations to app launches—the full cycle.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset