0% found this document useful (0 votes)
52 views63 pages

App Deep Linking

Uploaded by

davi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views63 pages

App Deep Linking

Uploaded by

davi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 63

Proprietary + Confidential

Getting started with


App Deep Linking
One-pager
Proprietary + Confidential

Blurred Lines
Between web and app

On average, a mobile shopping


session contains at least six
visits to an app and/or
mobile site*

*Google/Verto, U.S. “The Mobile Shopping Journey,” A18+ smartphone users, Oct. 2017.
Proprietary + Confidential

Mobile
Shopping
1 in 2 mobile shopping sessions
include at least one
transition between a
mobile site and an app

Google/Verto, U.S. “The Mobile Shopping Journey,” A18+ smartphone users, Oct. 2017.
Proprietary + Confidential

Consumers
Won’t Wait
For a great mobile experience

Smartphone users are significantly


more likely now than a year ago to
purchase from companies whose
mobile sites or apps allow them to
make purchases quickly

Google / Ipsos Connect, Jan. 2018, Playbook Omnibus 2018, n=1,604 US online smartphone users, A18+
Proprietary + Confidential

Web & App:


Better Together
Get ~2X CVRs on deep
linked ads by delivering
more frictionless mobile
experiences across web
and apps
92%
of all mobile time
is spent in apps
Proprietary + Confidential
Proprietary + Confidential

Users have shifted over half of their digital time to mobile;


with 9 of 10 minutes, that mobile time is dominated by apps

92%
of all mobile time
is spent in apps

Yet we’ve seen that many customers are not measuring the full value of their
app, with high volumes of in-app conversions being untracked.
Proprietary + Confidential

Thai
Thai food
food nearnear
me me
Proprietary + Confidential

Users expect us to be there for them, and be useful


at every touch point, especially on mobile

20%
OFF
Proprietary + Confidential

The challenge
Deep link to your in-app content
Proprietary + Confidential

Desktop https://www.website.com

Mobile web m.website.com

Apps ?
Direct users into your app from ads
Proprietary + Confidential

Search App
Deliver better ad experiences
Proprietary + Confidential
Deliver better campaign results
Proprietary + Confidential

65% 2.3x
YoY app sales app conversion
growth rate
Proprietary + Confidential

Tap into the benefits


of deep linking
Adopt deep linking & use App Deep
Links to drive more mobile
Deliver a seamless conversions
mobile experience ● 2x CVR driven by deep linked ads,
on average across industries

● Deep link adoption drove a 2.3x uplift


in app conversions for Otto Group
Close the loop on
mobile conversions ● Magalu saw a 35% increase in CVR from
mobile devices, leading to a 110% increase in
sales through the app and 40% growth in
overall mobile purchases.

Help improve
mobile ROI
New: in May’19 we launched App Deep Linking support Proprietary + Confidential

for Shopping ads (in addition to Search and Display)


User clicks on User lands on
Shopping ad same product in app
Proprietary + Confidential

Implementation
2 main requirements
Proprietary + Confidential

Use GA for Firebase SDK


Enable deep links
provides robust measurement &
using platform standards
optimization

App Links Universal Links Google Analytics for Firebase


About Deep Linking
Proprietary + Confidential

Deep links are a type of URL that takes • App Links (Android) and Universal Links (iOS)
people to specific online content seamlessly send users to the right page in
the app or website
• They use your existing HTTP destination URLs,
such as www.example.com or
www.example.com/product_1234, and take
users who have your app installed to the
in-app content you specify

Before After
Go to website ✓ If app installed: Go to app deep link X If app not installed:
Go to website
App Links Universal Links
About Deep Linking
Proprietary + Confidential

Deep links are a type of URL that take people to specific online content

App Links These links use your existing HTTP destination Visit our developer website ▪ Search
URLs, such as www.example.com or to learn more about App
(Android) ▪ Display
www.example.com/product_1234, and take Links [ ] for Android apps.
▪ Shopping
users who have your Android app installed to
▪ App engagement campaigns
the in-app content you specify.
▪ App dynamic remarketing
campaigns

Universal Links These links use your existing HTTP destination Visit our developer website ▪ Search
URLs, such as www.example.com or to learn more about
(iOS) www.example.com/product_1234, and take Universal Links [ ] for iOS
▪ Display

users who have your iOS app installed to the apps. ▪ Shopping
in-app content you specify. ▪ App engagement campaigns
▪ App dynamic remarketing
campaigns

Source: Google Ads Help Center: About Deep Linking (new!)


*Technically, deep links are URIs, not URLs, but non-technical people usually use URL and URI interchangeably.
Benefits of App Links and Universal Links
Proprietary + Confidential

Required to unlock key features — They are required to use: Demo video showing
the power of Universal
● App Deep Linking - App deep linking & measurement in Search, Shopping, and Display
/ App Links
campaigns
● Firebase App Indexing - Index your app on Google Search (organic), and drive traffic to it
● Actions on Google across Google Assistant, Google Home, Android, etc.
● In-Screen Search on Android
● Google Play Instant (Android Instant Apps)

More secure — No other app can use your links (unlike with Custom Schemes, where
other companies can claim your scheme and use it to send traffic into their own app).

Seamless user experience — Because it uses the same URL as your web links,
users are always gracefully taken to the mSite landing page as a fallback if the app can’t
open (no error pages, unlike with Custom Schemes, where error pages can happen) .
Clarifying what Google supports to deep link your
Proprietary + Confidential

customers from your web campaigns into your app


We believe that supporting App Links and Universal Links are the right thing to do for you and your
customers. Why? More reliable, better user experience, and safer.

Deep link type Google Ads support

App links Supported


Recommended

Universal links Supported


Recommended

Custom schemes Not supported


(but OK to use in: ACe → App Campaigns for Engagement, and AppDR → App Dynamic Remarketing)

Redirects Not supported


which include: (expect your redirect URLs to be flagged by Policy review)
- AppsFlyer’s OneLink
- Branch Smart Links
- Firebase Dynamic Links
Disambiguation dialog appearing when testing your
Proprietary + Confidential

deep links
Tried a search on your mobile device, clicked on your link and saw a dialog asking if you want to open
the app or continue to the browser? While this is common, this means that the App Links have been
incorrectly set up.

An Android App Link is a deep link based on your website URL


that has been verified to belong to your website. So clicking one
of these immediately opens your app if it's installed → the
disambiguation dialog does not appear.

If it does, this means there is an issue with the json file (it’s either
missing or it has some incorrect setup).

Please work with your developer to fix this, as you may risk losing
a valuable customer along the journey. An additional step =
friction in the journey. The goal is to provide a seamless
experience, with minimal friction..
Deep linking for developers
Proprietary + Confidential

For a deep dive, please go to this section.


About Conversion Tracking
Proprietary + Confidential

Are you missing a chunk of conversions?


Not-appified web campaign Total spend Conversions Conversion rate Cost/conversion

Campaign 1 $1000 100 10% $10

Appified web campaign Total spend Conversions Conversion rate Cost/conversion

Web App

Campaign 1 $1000 100 80 18% $5.56

By setting up in-app conversion


tracking you will capture the
full value of your campaigns

Phase 1 (today): plug the leaks using your 3d party provider (AAP)
Phase 2 (through 2020-2021): migrate to GA for Firebase
Report in-app events
Proprietary + Confidential

Step 1
& Link accounts Implement the GA for Firebase SDK

Step 2
Link GA for Firebase and Google Ads accounts

Step 3
Import app conversions into Google Ads — Import into all
Search+PLA+Display accounts all app events equivalent to
those included in conversions in website (optional: import
additional app events)

Step 4
Measure & optimize these app conversions in Google Ads
● Mark them as “Include in conversions” and bid
on them in Search+PLA+Display campaigns
● Ensure Auto-Tagging is enabled for all accounts
Why GA for Firebase?
Proprietary + Confidential

Robust Automated event Trusted and Cross web/


measurement setup and reliable data app features
and optimization standardized data

With automated event Will help provide Unified data privacy and Get a more holistic view
setup and standardized additional, standardized user controls will provide of the business across
data, we can provide signals to our models. robust transparency and app and web
robust measurement, control to users (please refer to slides
and our machine learning 25-29 for more info)
algorithms can further
improve performance.
Proprietary + Confidential

Product Roadmap
Product timeline
Proprietary + Confidential

1H’2020 2H’2020

Measure the Full Value Optimize for App Seamlessly Link Unified Measurement
of Web and Apps Destination into Apps across Web and App
● Ad destination ● Enhanced Smart ● In addition to Search, ● Cross-web/app conversion
segment UI reporting bidding (launched on Shopping and Display: tracking
in Ads Search, coming to consistent App deep ● App+web properties in Google
Shopping Ads) linking on YouTube, Analytics
Hotel Ads, Discovery
and Gmail
g
Use new Ad Destination report Comin
Proprietary + Confidential

soon

In the meantime, we can internally


pull this data for you and send the
csv file to you
Proprietary + Confidential

App + Web properties Value Prop


Google Analytics’ new App + Web properties

jcote@
Proprietary + Confidential

Google Analytics App + Web properties


Public Beta Starting Aug 2019

An App + Web property is a new and more powerful


Google Analytics property type that can collect and
report on data across both Web and App platforms and
enables faster, fresher, and deeper analysis of users.

When customers sign up for this beta, we upgrade their


existing Firebase App project to a new Google Analytics
property type with additional capabilities. App + Web
Properties will continue to exist alongside other Google
Analytics properties.
Proprietary + Confidential

Public Beta Launch - August 2019

We’ve publicly announced the App + Web


property and will be rolling out to all Google
Analytics and Google Analytics for Firebase
customers for free.

“It’s critical for brands and marketers to gain as


complete an understanding of their customers’
behavior as possible. The new App + Web capability
offers much greater visibility and insight than
Google Analytics and Google Analytics for Firebase
each could on their own.”
Proprietary + Confidential

A new way to unify app + web measurement


Beta participants today get access to a new property type
accessible via the Google Analytics platform. Product
functionality will be added continuously throughout the beta
period.
Today, you can benefit from:
● Unified event collection, processing
and reporting across web and app
● Event based reporting similar to GA for Firebase
+ new experimental reporting
● Cross-platform Reporting powered by Google Signals or user ID
● Measure certain events without
code changes (enhanced event
collection)
● Google Ads integration
● Analysis (widely used in GA for web) with Sessions support and
Ads Dimension support
Path Analysis in App + Web Properties
Proprietary + Confidential

Explore your user journeys in a tree graph.

The path analysis techniques lets you do things


like:

● Find the top pages that new users open


after opening the app.
● Discover what actions users take after
an app exception.
● Uncover looping behavior which may
indicate users becoming stuck.
● Determining the effects of an event on
subsequent users actions.
Proprietary + Confidential

Thank You
Proprietary + Confidential

Deep linking for developers


Custom Scheme Links (Old Solution)
Proprietary + Confidential

Pros:
Can be defined directly in app without
other registration
youtube:// youtube.com/watch ?v=abc123
Scheme Host Path Query String Cons:
Identifies which Identifies domain for which Specifies the Optional set of values Always tries to go to app even if it’s not
app to open. this link was invoked. location within to provide more user installed
the app to intent to the app.
App needs to Allows to differentiate e.g. open.
register than it can between country specific In this case the Are not unique (clashes with other
handle this versions for youtube to In this case identifier of the video, apps)
scheme. apply language settings the video but could be anything,
etc. watch page. e.g. signup form
entries, a hotel search Potential fraud
query etc.

So please use App Links (Android) and Universal Links (iOS)!


Benefits of App Links and Universal Links
Proprietary + Confidential

Required to unlock key features — They are required to use: Demo video showing
the power of Universal
● App Deep Linking - App deep linking & measurement in Search, Shopping, and Display
/ App Links
campaigns
● Firebase App Indexing - Index your app on Google Search (organic), and drive traffic to it
● Actions on Google across Google Assistant, Google Home, Android, etc.
● In-Screen Search on Android
● Google Play Instant (Android Instant Apps)

More secure — No other app can use your links (unlike with Custom Schemes, where
other companies can claim your scheme and use it to send traffic into their own app).

Seamless user experience — Because it uses the same URL as your web links,
users are always gracefully taken to the mSite landing page as a fallback if the app can’t
open (no error pages, unlike with Custom Schemes, where error pages can happen) .
App Links and Universal Links seamlessly send
Proprietary + Confidential

users to the right page in the app or website


Before After
Go to website ✔ If app installed: Go to app deep link ✘ If app not installed:
Go to website
App Links Universal Links

Enabling App Links Advertiser Eng team must map some or all web URLs to in-app pages by making code
changes to the app and adding a JSON file to the site. Web URLs will not change:
& Universal Links
Same URL*
Before enabling links: After enabling links:
https://youtube.com/watch?v=abc123 https://youtube.com/watch?v=abc123

PRO
TIP Test your App Links: Help Center

* IMPORTANT: This is why many marketers are unaware that their web URLs are App Links or Universal Links, because it was enabled by their engineers, without them knowing.
Proprietary + Confidential

Deep Link Implementation (Android: app link)

Before you start, make sure you have an app and a domain (website) which you are able to manage.

2 conditions to start App Links:


1. Add intent-filter to your app
2. Verify your ownership of domain

For iOS Universal Link, you can refer to this video for implementation.
Proprietary + Confidential

Deep Link Implementation (Android: app link)


● Typical app has a few template pages (e.g. product template page, purchase template page, etc) - these are called “activities”
● Each page (a “view” in Android terminology) has an associated activity, e.g. a leather jacket product page is associated with the
product activity
● When user clicks on a product link (either within app or outside of app)
● Handling links in apps needs to be done first before making the links App Links
● Step 1: Validate whether the app already has an intent filter to link users directly to the activity that they would like to promote with
ads. If there is any case where an activity is not covered by an existing intent filter, DEV STEP: add intent filter:
○ In manifest, add an intent filter that says e.g. IF scheme = ‘http’, host = ‘www.wish.com’ pathPrefix = ‘/product’ THEN launch
the activity ItemViewActivity.
■ your developer probably did this work for custom schemes already - it just requires redoing few simple steps with
different URLs.
○ Every activity has its own Java file to say how to handle that activity when it gets triggered.
○ In that Java file, access the URL that triggered this activity, using a standard function.
○ Once they have the URL, they can parse out the product_id, and then render the page based on that id.
■ They should already have a system in place to render a page for a particular id, because that’s a general app feature
required to even link people from within the app to a given product page.
● In order to convert the regular http links into App Links / Universal Links:
○ Add to manifest a new intent filter which says
■ Scheme = http
■ Domain = wish.com
■ Path = [same path that they use for their website]
Dev steps
Proprietary + Confidential

1. Update the function in ItemViewActivity to be able to extract the product_id from the web URL. Without doing the
following, there will be a disambiguation dialog box that shows when they try to open the http link. The links will
still be openable

2. Create a new file assetlinks.json, which has a fixed format. If they use Android Studio, it has an automated wizard
that auto-generates the assetlinks.json file

3. Host that page from [domain]/.well-known


Proprietary + Confidential

Deep Link Implementation (iOS: universal link)


● Typical app has a few template pages (e.g. product template page, purchase template page, etc) - these are called “view controllers”
● Each page has an associated view controller, e.g. a leather jacket product page is associated with the product view controller
● When user clicks on a product link (either within app or outside of app)
● Handling links in apps needs to be done first before making the links Universal Links
● Step 1: Validate whether the app already has code within main AppDelegate to handle linking users directly to the view controller that
they would like to promote with ads. If there is any case where a view controller is not covered by an existing link handling, DEV
STEP: add link handling in AppDelegate:
○ open the project’s Capabilities tab and enable Associated Domains. Click on the + button and add
webcredentials:*yourdomain.com.
○ In app code, within the main AppDelegate
■ Update the main application function to see if the activity that triggered app to open is
NSUserActivityTypeBrowsingWeb (Expected when app opens using universal links)
■ If yes, access url that opened app using userActivity.webpageURL
■ Add logic to figure out the type of page to open based on the URL and open the corresponding viewcontroller.
■ Example: IF url is a product page url, THEN parse out the product_id from the URL, and then open ITEM_VIEW
ViewController for this product_id
● In order to go from Custom Schemes to Universal Links:
○ IF developer stops short and only implements this far, then there will be a disambiguation dialog box that shows when they
try to open the http link. The links will still be openable
Dev steps
Proprietary + Confidential

1. Create a new file apple-app-site-association, which has a fixed format. (It lists the paths you want to open in the
app and id of the app that opens it)

2. Host that page from [domain]/ OR from [domain]/.well-known/


Proprietary + Confidential

App Link (Android): Deep Dive


1. Add URL intent filter

Confidential, Internal Only


[App] AndroidManifest.xml

Confidential, Internal Only


[App] Declare the URI

To enable your app to handle App Links, declare the URI patterns in your App
AndroidManifest file.

Confidential, Internal Only


[App] Add action and category

Intent filter for App Links must have VIEW action (android.intent.action.VIEW) and
BROWSABLE category (android.intent.category.BROWSABLE).

Confidential, Internal Only


[App] Turn on android:autoVerify

To enable automatic link handling verification for your app, set the android:autoVerify
attribute to true.

Confidential, Internal Only


2. Add logic to handle the intent

Confidential, Internal Only


[App] Handle App Links (sample)

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_recipe);
String action = getIntent().getAction();
String data = getIntent().getDataString();

if(Intent.ACTION_VIEW.equals(action) && data != null){


// App Links handling process here
}
}

Confidential, Internal Only


3. Associate your website

Confidential, Internal Only


[Website] Create assetlinks.json

Confidential, Internal Only


[Website] Package name

Your app package name declared in


the app's manifest.

Confidential, Internal Only


[Website] Fingerprints
The SHA256 fingerprints of your
app’s signing certificate.

You can use the following command


to generate the fingerprint via the
Java keytool.

$ keytool -list -v -keystore <your keystore file>

Confidential, Internal Only


[Website] Host assetlinks.json file

Please host your Digital Asset Links JSON file on your domain .well-known location.

The system verifies the JSON file via the encrypted HTTPS protocol. Make sure that your
hosted file is accessible over an HTTPS connection, regardless of whether your app's intent
filter includes https.

Confidential, Internal Only


4. Debugging

Confidential, Internal Only


[Debug] Verify assetlinks.json
Verifying your Digital Asset Links JSON file in .well-known directory on your domain.
$ curl -l
'https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://your-website-host-domain.com
&relation=delegate_permission/common.handle_all_urls'
{
"statements": [
{
"source": {
"web": {
"site": "https://photos.google.com."
}
},
"relation": "delegate_permission/common.handle_all_urls",
"target": {
"androidApp": {
"packageName": "com.google.android.apps.photos",
"certificate": {
"sha256Fingerprint": "3D:7A:12:23:01:9A:A3:9D:9E:A0:E3:43:6A:B7:C0:89:6B:FB:4F:B6:79:F4:DE:5F:E7:C2:3F:32:6C:8F:99:4A"
}

}
}
“ERRORS: None” means Validated !!
}
],
"maxAge": "38.430176182s",
"debugString": "********************* ERRORS *********************\n None!\n********************* INFO MESSAGES *********************\n* Info: The
following statements were considered when processing the request:\n\n---\nSource: Web asset with site https://photos.google.com. (which is equivalent to
'https://photos.google.com')\nRelation: delegate_permission/common.handle_all_urls\nTarget: Android app asset with package name com.google.android.apps.photos and
certificate fingerprint 3D:7A:12:23:01:9A:A3:9D:9E:A0:E3:43:6A:B7:C0:89:6B:FB:4F:B6:79:F4:DE:5F:E7:C2:3F:32:6C:8F:99:4A\nWhere this statement came from:\n Origin
of the statement: Web asset with site https://photos.google.com. (which is equivalent to 'https://photos.google.com')\n Include directives followed (in order):\n
\u003cNone\u003e\nMatches source query: Yes\nMatches relation query: Yes\nMatches target query: Yes\n\n--- End of statement list. ---\n\n\n"
} Confidential, Internal Only
[Debug] Verify assetlinks.json (logcat)
You can verify assetlinks.json verification status using 'adb logcat' command like
following. When you install your app, Android system verifies assetlinks json hosted on your
domain. If it doesn’t, please use 'adb shell pm clear com.android.statementservice'
command to clear cache.

$ adb logcat | grep 'SingleHostAsyncVerifier'


09-29 11:53:31.851 4374 12473 I SingleHostAsyncVerifier: Verification result: checking for a statement with
source a <
09-29 11:53:31.851 4374 12473 I SingleHostAsyncVerifier: a: "https://mpo-ct-test.appspot.com"
09-29 11:53:31.851 4374 12473 I SingleHostAsyncVerifier: >
09-29 11:53:31.851 4374 12473 I SingleHostAsyncVerifier: , relation delegate_permission/common.handle_all_urls,
and target b <
09-29 11:53:31.851 4374 12473 I SingleHostAsyncVerifier: a: "com.thirdparty.example"
09-29 11:53:31.851 4374 12473 I SingleHostAsyncVerifier: b <
09-29 11:53:31.851 4374 12473 I SingleHostAsyncVerifier: a:
"EE:54:D4:C2:89:2A:67:5D:C1:CF:FA:58:54:65:F6:C3:38:3C:12:6F:82:8C:AA:23:DF:43:40:16:C4:6F:38:C1"
09-29 11:53:31.851 4374 12473 I SingleHostAsyncVerifier: >
09-29 11:53:31.851 4374 12473 I SingleHostAsyncVerifier: >
09-29 11:53:31.851 4374
Confidential, Internal Only 12473 I SingleHostAsyncVerifier: --> true.
[Debug] Verify App Links
Install your app from Android Studio or Play Store, and use following adb command to check
whether you app handles the App Links correctly.

$ adb shell am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d "<your-app-link-uri>"


Starting: Intent { act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE]
dat=https://www.android.com/... }

Check point:

1. Check your web-server log that your assetlink JSON file was downloaded when you
installed your app.
2. “adb shell dumpsys package d” command helps you to identify App Links.
“Status: always” indicates the domain will be opened without dialog.

Confidential, Internal Only


Resources
Proprietary + Confidential

Help Center
App Links (Android)
Universal Links (iOS)

You might also like