56
An introduction to deep linking and App Indexing codelab

An Introduction to Deep Linking and App Indexing Codelab

Embed Size (px)

Citation preview

Page 1: An Introduction to Deep Linking and App Indexing Codelab

An introduction to deep linking and App Indexing codelab

Page 2: An Introduction to Deep Linking and App Indexing Codelab

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

Page 3: An Introduction to Deep Linking and App Indexing Codelab

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

Page 4: An Introduction to Deep Linking and App Indexing Codelab

Remember 1998?

Page 5: An Introduction to Deep Linking and App Indexing Codelab

Number of Web Hostnames 1991-2014

Page 6: An Introduction to Deep Linking and App Indexing Codelab

Number of Web Hostnames 1991-2014

Page 7: An Introduction to Deep Linking and App Indexing Codelab

Number of Web Hostnames 1991-2014

Page 8: An Introduction to Deep Linking and App Indexing Codelab

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

Page 9: An Introduction to Deep Linking and App Indexing Codelab

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

Page 10: An Introduction to Deep Linking and App Indexing Codelab

Re-engage existing usersAcquire new users

Page 11: An Introduction to Deep Linking and App Indexing Codelab

Google helps drive app installs through Search results.

Page 12: An Introduction to Deep Linking and App Indexing Codelab

Drive usage and engagement through App Indexing.

Page 13: An Introduction to Deep Linking and App Indexing Codelab

App Indexing

Page 14: An Introduction to Deep Linking and App Indexing Codelab

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

Page 15: An Introduction to Deep Linking and App Indexing Codelab

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

Page 16: An Introduction to Deep Linking and App Indexing Codelab

Get your app in the Index.

Page 17: An Introduction to Deep Linking and App Indexing Codelab

Re-engage existing usersAcquire new users

Page 20: An Introduction to Deep Linking and App Indexing Codelab

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

Page 21: An Introduction to Deep Linking and App Indexing Codelab

Appendix

Implementing App Indexing

Page 22: An Introduction to Deep Linking and App Indexing Codelab

Step 1:Add deep link support to app

Step 3:Publish app deep links

Indexing

App Indexing

Step 2:Verify

website

Page 23: An Introduction to Deep Linking and App Indexing Codelab

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

Page 24: An Introduction to Deep Linking and App Indexing Codelab

<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

Page 25: An Introduction to Deep Linking and App Indexing Codelab

<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

Page 26: An Introduction to Deep Linking and App Indexing Codelab

<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

Page 27: An Introduction to Deep Linking and App Indexing Codelab

<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

Page 28: An Introduction to Deep Linking and App Indexing Codelab

@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

Page 29: An Introduction to Deep Linking and App Indexing Codelab

Step 1:Add deep link support to app

Step 3:Publish app deep links

Indexing

App Indexing

Step 2:Verify

website

Page 30: An Introduction to Deep Linking and App Indexing Codelab
Page 31: An Introduction to Deep Linking and App Indexing Codelab
Page 32: An Introduction to Deep Linking and App Indexing Codelab
Page 33: An Introduction to Deep Linking and App Indexing Codelab
Page 34: An Introduction to Deep Linking and App Indexing Codelab
Page 35: An Introduction to Deep Linking and App Indexing Codelab
Page 36: An Introduction to Deep Linking and App Indexing Codelab

Step 1:Add deep link support to app

Step 3:Publish app deep links

Indexing

App Indexing

Shortcut!

Step 2:Verify

website

Page 37: An Introduction to Deep Linking and App Indexing Codelab

Step 1:Add deep link support to app

Indexing

App Indexing

Step 2:Verify

website

Step 3:Publish app deep links

Website markupSitemap

Page 38: An Introduction to Deep Linking and App Indexing Codelab

<html>

<head> ...

...

</head>

Example.com

App Indexing

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

Page 39: An Introduction to Deep Linking and App Indexing Codelab

App Indexing

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

Page 40: An Introduction to Deep Linking and App Indexing Codelab

App Indexing

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

Means there’s another version of this document somewhere

Page 41: An Introduction to Deep Linking and App Indexing Codelab

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” />

Page 42: An Introduction to Deep Linking and App Indexing Codelab

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

Unique single string address

App Indexing

Protocol

Page 43: An Introduction to Deep Linking and App Indexing Codelab

Unique single string address

App Indexing

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

Protocol Package ID

Page 44: An Introduction to Deep Linking and App Indexing Codelab

Unique single string address

App Indexing

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

Protocol Package ID• http

• custom

Scheme

Page 45: An Introduction to Deep Linking and App Indexing Codelab

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” />

Page 46: An Introduction to Deep Linking and App Indexing Codelab

<?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

Page 47: An Introduction to Deep Linking and App Indexing Codelab

Step 1:Add deep link support to app

Step 3:Publish app deep links

Indexing

App Indexing

Step 2:Verify

website

Page 48: An Introduction to Deep Linking and App Indexing Codelab

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

Page 49: An Introduction to Deep Linking and App Indexing Codelab
Page 50: An Introduction to Deep Linking and App Indexing Codelab
Page 51: An Introduction to Deep Linking and App Indexing Codelab
Page 52: An Introduction to Deep Linking and App Indexing Codelab
Page 53: An Introduction to Deep Linking and App Indexing Codelab
Page 54: An Introduction to Deep Linking and App Indexing Codelab
Page 55: An Introduction to Deep Linking and App Indexing Codelab

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

Page 56: An Introduction to Deep Linking and App Indexing Codelab

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