Skip to main content

I have two unbounce pages - one mobile version and one desktop version. I have a domain name which is currently hosted and pointing to unbounce. My question is how do i connect this to both my desktop and mobile site?

you can insert this javascript


<script type="text/javascript"> <br /> // <![CDATA[
<br /> var mobile = (/iphone|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase())); <br /> if (mobile) { <br /> var desktopURL = "INSERT URL OF MOBILE PAGE HERE"; <br /> var params = window.location.href.split('?')[1]; <br /> document.location = (params == undefined) ? desktopURL : desktopURL + '?' + params;
<br /> }
<br /> // ]]> <br /><br /> </script>

This will redirect if visitor is using mobile device


Hello,

can i do this in the other direction too? I have around 90% mobile traffic - but sometimes there come users with desktop devices… I like to send them to a desktop version of the landingpage.


Hi,


Thanks for the reply, do i insert this into the desktop version or the mobile version of the landing page?


Hi Luke and Wilhelm - we’ve got two versions of a redirect script that you can use here: https://getsatisfaction.com/unbounce/…


Either the script Alex kindly shared above or the “Mobile redirect (just to mobile)” script in the link above can be added to your desktop page and it will direct users to the mobile page.


The other option is to use the other script–“Mobile redirect (to desktop and mobile)”–that you can add to a third page with just that script added. Then you direct all of your visitors to that page and they’ll be pushed to either the desktop or mobile version of your page, as necessary.


If you’ve never inserted scripts on your Unbounce pages before, here’s a quick guide on how to do that: http://support.unbounce.com/entries/5…


Reply