Streaming live at 10am (PST)

Redirect to App Store or Play Store if Webflow website opened from an iPhone or an Android device


#1

Hi folks!

Is it possible to redirect instantaneously my Webflow website that I built for an app directly to the App Store link or the Play Store link if it has been opened from an iPhone or an Android device?

Let me know if you get any idea!

Cheers :smile:


Here is my public share link: LINK
(how to access public share link)


#2

A quick google search brought this up on the first hit. Worth a quick try... put the script below in the "footer code" area within the custom code section of your site settings, then check to see if it works - obviously, putting your app links in place of what is shown in the script below. Don't forget to wrap the entire thing in opening/closing script tags...

    $(document).ready(function (){
     if(navigator.userAgent.toLowerCase().indexOf("android") > -1){
         window.location.href = 'http://play.google.com/store/apps/details?id=com.truecaller&hl=en';
     }
     if(navigator.userAgent.toLowerCase().indexOf("iphone") > -1){
         window.location.href = 'http://itunes.apple.com/lb/app/truecaller-caller-id-number/id448142450?mt=8';
     }
    });

#3

Hey @mogeek! Thanks for this. Just tried but sounds like it's not working. Any other idea in mind?

Here is the code I added :

  <script>
  $(document).ready(function (){
     if(navigator.userAgent.toLowerCase().indexOf("iphone") > -1){
         window.location.href = 'http://itunes.apple.com/lb/app/truecaller-caller-id-number/id1053998412?mt=8';
     }
    });>
    </script>

Cheers!


#4

Hi There,

Nope, I have no help beyond the link posted. Maybe check around google & stackexchange a bit more, or hope somebody else can chime in here.


#5

I may be wrong, but I think I heard a major Google indexing penalty would be applied for these app store auto-redirects. You might want to look into that and see if this is true. A tasteful pop up would be a better user experience than an auto redirect.


#6

Alright folks! It works now. Here is the code used:

<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>

<script>
        $(document).ready(function (){
         if(navigator.userAgent.toLowerCase().indexOf("iphone") > -1){
             window.location.href = 'http://itunes.apple.com/lb/app/truecaller-caller-id-number/id1053998412?mt=8';
         }
        });
</script>

#7

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.