Search
Clear search
Close search
Google apps
Main menu

Implement deep links in mobile app ads

Ad Exchange allows advertisers to direct users to an application (app), rather than a mobile web page, for users who click on their mobile ad. Using deep-linking and an app configured to handle an approved Uniform Resource Identifier (URI), advertisers can direct users to an app store to download an app, or to a specific section of an installed app.

Ad Exchange currently supports deep-linking by default. However, some iOS and Android apps are excluded.

Learn more about why an app might be excluded

Apps need to be configured to properly handle a deep-linking URI. There are three reasons why an app might be excluded from deep-linking support:

  • Device-level intent that allows access to device capabilities (for example, tel:// file://)
  • Common errors with intents (for example, htttttp://)
  • Apps that provide non-moderated access to the public internet (for example, Chrome)

You can contact your account team for more information or for troubleshooting deep-linking configuration.

To link to an app from your mobile creative:

  1. Ensure that the app supports deep-linking and that you have the correct URI to take users to their app.
  2. Add deep-linking to your app content. You can use the full URI path to deep-link to specific areas of the app, as opposed to just launching the app. Learn more
  3. Declare the landing page of your mobile creative as the URI in the click_through_url field in your bid response.

    To avoid potential creative disapproval issues, you should also declare the URI and/or URL that will be used in case the user does not have the advertiser's app installed on their device. For example, if the advertiser is YouTube and you are taking the user to the YouTube app, you should declare:

    • App: youtube://
    • App download: market://details?id=com.google.android.youtube (Android) or itms://youtube/id544007664 (iOS)
    • URL: https://play.google.com/store/apps/details?id=com.google.android.youtube (Android) or https://itunes.apple.com/us/app/youtube/id544007664?mt=8 (iOS)

If the declared URI is taking the user to the app download page in either the Google Play Store or iTunes App Store, the full URI path must be declared. If only the root is declared (for example, market:// or itms://), the bid will be filtered out of the auction.

Best practices for in-app deep linking on AdX

Devices running iOS9+

  • Bidders should work with their app advertisers to recommend implementing universal links. If enabled, bidder can return a single URL that will deep-link to the app if the app is installed, and otherwise fallback to the mWeb page.
  • A helpful how-to is here
  • Example:

Devices running Android M+

  • Bidders should work with their app advertisers to recommend declaring website associations.
  • This will have a similar result as Universal Links. If enabled in the app, bidders can set the click-through to deep-link to the app. It will then fallback to the mobile webpage automatically.

Devices running earlier operating systems and/or if universal links / website associations are not enabled

  • Bidders can use Javascript in their creative to open a browser that attempts to deep-link to an app.
  • In the Javascript, bidders can build a timeout such that if the app does not respond, a click should fallback to the mobile webpage.
  • A helpful stackoverflow explanation is here.
  • Example:
<script type="text/javascript">
        window.onload = function() {
              // Deep link to your app goes here
              document.getElementById("l").src = "my_app://";

              setTimeout(function() {
                 // Link to the App Store should go here -- only fires if deep link fails
                 window.location = 
              "https://itunes.apple.com/us/app/my.app/id123456789?ls=1&mt=8";
              }, 500);
              };
</script>

If all else fails, bidders can deep-link directly to the app.

  • For example: youtube://
  • If the app is installed, the user will be taken to the app via the deep link.
  • If and only if the app is not installed, the click will not go anywhere.
    • Thus, bidders should only deep-link for users that they know have previously installed the app, based on data from their analytics SDK(s).

Note: the OS version of the device can be determined in the bid request using this mapping. See the excerpt below:

// The platform of the device. Examples: android, iphone, palm
optional string platform = 2;

// The brand of the device, e.g., Nokia, Samsung
optional string brand = 3 [default = ""];

// The model of the device, e.g., N70, Galaxy
optional string model = 4 [default = ""];

// Contains the OS version of the platform. For instance, for Android 2,
// major=2, minor=0. For iPhone 3.3.1, major=3 and minor=3
message OsVersion {
  optional int32 major = 1;
  optional int32 minor = 2;
  optional int32 micro = 3;
}

// The OS version; e.g., 2 for Android 2.1, or 3.3 for iOS 3.3.1
optional OsVersion os_version = 5;

Frequently asked questions

Is deep-linking available to anyone?
Any Ad Exchange buyer can use deep-linking as long as the URI is not on the list of excluded URIs. Contact your account team for more information.
Does deep-linking work with any app?

Apps need to be configured to properly handle a deep-linking URI. Once an app is set up to allow for deep-linking, you may begin using the URI, following the declaration instructions above.

Learn how to add deep-linking to your app.

How can I confirm proper configuration of a deep-linking URI in an app?
Download the Deep-linking Verification Tool (Android only) to verify correct deep-linking URI configuration.
Is the URI the same for both Android and iOS versions of apps?
The format of the URI used to trigger or deep-link an app is often different, depending on the mobile operating system. Ensure that you are using the proper format for Android if the ad serves on an Android device (for example, Android: //launch?location=123456 versus iOS: //location/123456).
Does Ad Exchange tell the buyer in the bid request if the user has already installed an app?
Bid requests do not include information about installed apps. Linking to an app in an app store should work automatically. However, when deep-linking to specific locations in apps, buyers are responsible for bidding when they (1) know the user has the app installed or (2) have implemented back-up logic.
What happened to a creative that included a deep-linking URI before it was supported?
Before deep-linking was supported by default, any creative that included a deep-linking URI as the click_through_url value was disapproved for "Invalid URL Protocol".
Was this article helpful?
How can we improve it?
Having issues? Try live chat!

Get instant access to an AdX Buyer support specialist by clicking “Contact Us” followed by “Ad Exchange” at the upper right hand corner.