Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make deferred deep linking?

How to make deferred deep linking and generate unique mobile signature. I try using IP Address, screen-size, OS version, device name but still not get succeed.

like image 449
Mahek Avatar asked May 20 '15 14:05

Mahek


People also ask

How do I create a deferred deep link?

Prompt a non-app user on a smartphone to download the app before directing to specific page or content within the app when the launch it. Direct a user on a desktop or laptop computer to an appropriate page on your website instead of mobile app. Provide attribution data when each link has been clicked.

What is a deferred deeplink?

The deferred deep link sends users to a specific place in your app after first routing them through the relevant app store to reinstall the app.

How do you make a deep link?

In the Link Settings and Redirects section, after you enable the link for iOS, Android, or both, fill out the following fields: "If the app is not installed go to" (this is the fallback redirect) "If the app is already installed, go to: (deep link)" "After installation, go directly to: (deferred deep link)"


1 Answers

The comment links to a great answer, certainly. High level, here are the steps:

  1. Your links should point to a page on your site that collects a digital fingerprint
  2. That page should collect, at minimum, IP address, OS, OS version and screen size (width and height). Should send to your server and place in a persistent store. Redis works great for this because of its fast lookup times. Also record some sort of unique identifier for which link was clicked (that could be the value in redis).
  3. Then redirect to the app (URI scheme) and have a fallback to the App Store/Play Store. Here's an example for iOS. The beauty of the iframe is that it kills the alertView if the app is not installed. This should be placed in the body:

        <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>
        <iframe id="l" width="1" height="1" style="visibility:hidden"></iframe>
    
  4. When a user opens your app, send up the same combination of params to your servers and search your persistent store to see if this device recently clicked on a link. Send a response down to your app (e.g. { link_id: "1234" } or { link_id: -1 }) Your app logic should then respond based on which link was clicked.

Hopefully this makes sense. We do this at Branch and can assure you that it's harder than it looks to roll this solution from scratch. There are a ton of edge cases introduced by individual browsers and even individual apps (e.g. when links are shared to Twitter and clicked on in the native Android app). But at it's core fingerprinting is relatively simple. Hopefully the above was helpful.

like image 63
st.derrick Avatar answered Nov 01 '22 13:11

st.derrick