Enhance Search Performance

Improve your app's ranking in Google Search, from content creation through performance analysis.

Analyze with Search Console

Use the Search Analytics report in the Search Console to analyze and improve your app's search performance. Filter and group data by categories such as search query, pages, or country. Using the Search Appearance filter, you can also analyze the performance of the Install button for your app. Read more about how to use the Search Analytics Report in our Help Center.

Analyze with Search referrals

You can use the referrer information from links to your app that come from Google Search for other analytics tools. For example, our codelab on tracking referrals to your app shows how you might use search referrals in combination with Google Analytics for overall app analysis.

To build your own solution for tracking Search traffic to your app, you can pass a test android.intent.extra.REFERRER_NAME extra to your app using the Android Debug Bridge. The following example command demonstrates how to do this, assuming your app's package name is package_name and your app URL is www.examplepetstore.com:

adb shell am start
   -a android.intent.action.VIEW
   -c android.intent.category.BROWSABLE
   -e android.intent.extra.REFERRER_NAME android-app://com.google.android.googlequicksearchbox/https/www.examplepetstore.com
   -d http://examplepetstore.com/host_path com.examplepetstore.android

This test simulates opening a HTTP URL in your app and passing in referrer information specifying that the traffic came from the Google app.

Extract Referrer Information

The com.google.firebase.appindexing.AndroidAppUri class helps with extracting referrer URIs. An Intent extra provides the referrer information for your HTTP URL with the following key: android.intent.extra.REFERRER_NAME.

The following examples show referrer values from various sources:

  • Chrome: https://www.google.com
  • Google app: android-app://com.google.android.googlequicksearchbox/https/www.google.com
  • Googlebot: android-app://com.google.appcrawler
  • Google AdsBot App Crawler: android-app://com.google.adscrawler

The following code snippet shows how to extract referrer information from Search.

MainActivity.java

import com.google.firebase.appindexing.AndroidAppUri;
import android.net.ParseException;

...

public class MainActivity extends Activity {

    @Override
    public Uri getReferrer() {

     // There is a built in function available from SDK>=22
     if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1) {
       return super.getReferrer();
     }

     Intent intent = this.getIntent();
     Uri referrer = (Uri) intent.getExtras().get("android.intent.extra.REFERRER");
     if (referrer != null) {
       return referrer;
     }

     String referrer_name = intent.getStringExtra("android.intent.extra.REFERRER_NAME");

     if (referrer_name != null) {
       try {
         return Uri.parse(referrer_name);
       } catch (ParseException e) {
       }
     }

     return null;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ...
        Uri referrer = getReferrer();

        if (referrer != null) {
            if (referrer.getScheme().equals("http") || referrer.getScheme().equals("https")) {
                // App was opened from a browser
                // host will contain the host path (e.g. www.google.com)
                String host = referrer.getHost();

                // Add analytics code below to track this click from web Search
                ...

            } else if (referrer.getScheme().equals("android-app")) {
                // App was opened from another app
                AndroidAppUri appUri = AndroidAppUri.newAndroidAppUri(referrer);
                String referrerPackage = appUri.getPackageName();
                if ("com.google.android.googlequicksearchbox".equals(referrerPackage)) {
                    // App was opened from the Google app
                    // host will contain the host path (e.g. www.google.com)
                    String host = appUri.getDeepLinkUri().getHost();

                    // Add analytics code below to track this click from the Google app
                    ...

                } else if ("com.google.appcrawler".equals(referrerPackage)) {
                    // Make sure this is not being counted as part of app usage
                }
            }
        }
        ...
    }
    ...
}

Create Good Web & Mobile Content

You can enhance your app's ranking by providing high-quality content in both your app and your associated website. This is because our systems analyze the association between the two properties to determine ranking for both web and mobile Search results. Specifically, keep in mind the following:

  • Make sure your associated site meets our design and content guidelines.
  • Follow the same practices recommended in our Mobile SEO guide.
  • Make sure you follow the recommended practices for your app as described in Search Console for Apps on our Help Center.

In order to ensure a great search experience for users, Google may take corrective action in cases where we see abuse, deception, or other actions that hurt the search experience for users. This can include actions such as demoting or removing your HTTP URLs from Google Search results.

Send feedback about...

Need help? Visit our support page.