------------------------- <html> <script> function openApp () { var start, end, elapsed; var params = window.location.href.split("lp=")[1]; var url = params.split("&customURI=")[0]; var customURI = params.split("&customURI=")[1]; var time = (new Date()).getTime(); document.location = customURI+url; setTimeout(function(){ var now = (new Date()).getTime(); if((now - time)<2550) { javascript: console.log(new Date().getTime()); document.location = url; } else{ window.open('', '_self', ''); window.close(); } }, 2000); } </script> <body onload="openApp()"> <a onclick="openApp()" id="newButton">Click Here to open the App</a> </body> (Source: https://stackoverflow.com/questions/11710902/can-i-make-a-link-that-will-open-in-my-app-if-its-installed-and-fall-back-to-a) </plaintext>