An Introduction to Deep Linking and App Indexing Codelab

Preview:

Citation preview

An introduction to deep linking and App Indexing codelab

We have tons of apps on our smartphones, but how many do we actually use?

US users have an average of 33 apps, but only engage with roughly ⅓ of them

Remember 1998?

Number of Web Hostnames 1991-2014

Number of Web Hostnames 1991-2014

Number of Web Hostnames 1991-2014

How can we, together, help users make the best of their day in this new mobile world?

Protocol Package ID• http

• custom

Scheme Host Path

Unique single string address

Anatomy of a deep link

android-app://com.example/http/example.com/gizmos

Re-engage existing usersAcquire new users

Google helps drive app installs through Search results.

Drive usage and engagement through App Indexing.

App Indexing

Using app indexing to re-engage users: The Etsy app on Android was able to increase daily app traffic from referrals by 11.6%.

https://developers.google.com/app-indexing/case-studies

Re-engage users in search completions with the App Indexing API

Get your app in the Index.

Re-engage existing usersAcquire new users

How to index your app (codelab)

Add support for deep links in your Android app

App calls to the App Indexing API

Update sitemap or web pages with deep link info

Verify your app against your site on your Google Play Developer Console

1

2

3

To run the codelab visit:

4

1. http://search-codelabs.appspot.com/codelabs/android-deep-linking2. http://search-codelabs.appspot.com/codelabs/app-indexing3. http://search-codelabs.appspot.com/codelabs/web-deep-linking

Appendix

Implementing App Indexing

Step 1:Add deep link support to app

Step 3:Publish app deep links

Indexing

App Indexing

Step 2:Verify

website

Step 3:Publish app deep links

Indexing

App Indexing

Step 2:Verify

website

Step 1:Add deep link support to app

HTTP or Custom scheme

<activity android:name="com.example.android.GizmosActivity" android:label="@string/title_gizmos" > <intent-filter android:label="@string/filter_title_viewgizmos"> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <!-- Accepts URIs that begin with "http://example.com/gizmos” --> <data android:scheme="http" android:host="example.com" android:pathPrefix="/gizmos" /> </intent-filter></activity>

manifest.xml

App Indexing

<activity android:name="com.example.android.GizmosActivity" android:label="@string/title_gizmos" > <intent-filter android:label="@string/filter_title_viewgizmos"> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <!-- Accepts URIs that begin with "http://example.com/gizmos” --> <data android:scheme="http" android:host="example.com" android:pathPrefix="/gizmos" /> </intent-filter></activity>

manifest.xml

App Indexing

<activity android:name="com.example.android.GizmosActivity" android:label="@string/title_gizmos" > <intent-filter android:label="@string/filter_title_viewgizmos"> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <!-- Accepts URIs that begin with "example://gizmos” --> <data android:scheme="example" android:host="gizmos" /> </intent-filter></activity>

manifest.xml

App Indexing

<activity android:name="com.example.android.GizmosActivity" android:label="@string/title_gizmos" > <intent-filter android:label="@string/filter_title_viewgizmos"> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <!-- Accepts URIs that begin with "example://gizmos” --> <data android:scheme="example" android:host="gizmos" /> </intent-filter></activity>

manifest.xml

App Indexing

@Override public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);setContentView(R.layout.main);

Intent intent=getIntent();String action=intent.getAction();Uri data=intent.getData();…Intent intentNext=new Intent(this, nextGizmosActivity.class);startActivity(intentNext);

}

GizmosActivity.java

App Indexing

Step 1:Add deep link support to app

Step 3:Publish app deep links

Indexing

App Indexing

Step 2:Verify

website

Step 1:Add deep link support to app

Step 3:Publish app deep links

Indexing

App Indexing

Shortcut!

Step 2:Verify

website

Step 1:Add deep link support to app

Indexing

App Indexing

Step 2:Verify

website

Step 3:Publish app deep links

Website markupSitemap

<html>

<head> ...

...

</head>

Example.com

App Indexing

<link rel=“alternate” href=“android-app://com.example/http/example.com/gizmos” />

App Indexing

<link rel=“alternate” href=“android-app://com.example/http/example.com/gizmos” />

App Indexing

<link rel=“alternate” href=“android-app://com.example/http/example.com/gizmos” />

Means there’s another version of this document somewhere

Unique single string address

App Indexing

Means there’s another version of this document somewhere

<link rel=“alternate” href=“android-app://com.example/http/example.com/gizmos” />

<link rel=“alternate” href=“android-app://com.example/http/example.com/gizmos” />

Unique single string address

App Indexing

Protocol

Unique single string address

App Indexing

<link rel=“alternate” href=“android-app://com.example/http/example.com/gizmos” />

Protocol Package ID

Unique single string address

App Indexing

<link rel=“alternate” href=“android-app://com.example/http/example.com/gizmos” />

Protocol Package ID• http

• custom

Scheme

Protocol Package ID• http

• custom

Scheme Host Path

Unique single string address

App Indexing

<link rel=“alternate” href=“android-app://com.example/http/example.com/gizmos” />

<?xml version="1.0" encoding="UTF-8" ?>

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"

xmlns:xhtml="http://www.w3.org/1999/xhtml">

<url> <loc>http://example.com/gizmos</loc>

<xhtml:link rel="alternate" href="android-app://com.example/http/example.com/gizmos" /></url>

...</urlset>

sitemap.xml

App Indexing

Step 1:Add deep link support to app

Step 3:Publish app deep links

Indexing

App Indexing

Step 2:Verify

website

Step 1:Add deep link support to app

Step 3:Publish app deep links

Indexing

App Indexing

Step 2:Verify

website

Check for errors & status

Step 1:Add deep link support to app

Step 3:Publish app deep links

Indexing

App Indexing

Step 2:Verify

website

Check for errors & status

Troubleshooting App Indexing

Read the blog post: http://googledevelopers.blogspot.com/2014/12/four-steps-to-supercharge-deep-linking.html

Check out the FAQ: https://developers.google.com/app-indexing/faq

If all else fails, try https://productforums.google.com/forum/#!forum/webmasters or http://stackoverflow.com/questions/tagged/android-app-indexing

1

2

3

Recommended