2.8K members online now
2.8K members online now
Welcome to the Official Google AdWords Community
Find optimization tips and how-to guides and videos by the Google team, AdWords Experts and other industry experts
star_border
Collaborator ✭ ☆ ☆

Desktop and Mobile Landing Pages For Enhanced Campaigns:

How to use Mobile and Desktop landing pages in Enhanced campaign.

Update: I think This article on inside adwords is more updated version of my article

  • Using {ifmobile} parameter in the url

This will work only if your mobile and desktop landing pages are in a particular structure.

 

For example if your desktop landing page is whatever.com and your mobile landing page is whatever.com/mobile/.

You can use destination URL as is whatever.com/{ifmobile:mobile/}

 

Now adwords will process this URL internally onclick and process it in following way

If click happens from Desktop then{ifmobile:mobile/} will not trigger and the landing page will be whatever.com/.

 

If click happens from mobile then{ifmobile:mobile/} will trigger and langing page will be like whatever.com/mobile/

This is easiest solution but requires a URL structure which you might not get on all websites.

 

  • Using {device} parameter

This will work in all kind of URL structures and doesn't need a particular type.

 

For example lets say your desktop landing page is whatever.com and your mobile landing page is mobile.whatever.com

In this case you will need to do bit of coding, don't worry just 16 lines of it  Smiley Very Happy

 

So in this case your destination URL will neither be whatever.com nor mobile.whatever.com, it will be a page hosted on whatever.com like whatever.com/destination.php?device={device}

 

Now when click happens from mobile Adwords will render this URL as whatever.com/destination.php?device=m

 

If click happens from tablet Adwords will render this URL as whatever.com/destination.php?device=t

 

If click happens from desktop Adwords will render this URL as whatever.com/destination.php?device=c

 

Here is a piece of code which redirects tablet and desktop users to desktop page and mobile users to mobile page.

This code also carries forward query string parameters so if you are using UTM parameters for tagging or autotagging you still have your data in analytics and there is no data loss due to redirect

Spoiler

<?php
$a = $_SERVER['QUERY_STRING'];
if (strpos($a,'device=m') !== false) {

$location = 'http://m.whatever.com/?'. '&' . $a;
}
else
{
$location = 'http://whatever.com/index.php?' . '&' . $a;

echo '<br />';

}
header ('HTTP/1.1 301 Moved Permanently');
header ('Location: '.$location);
?>

 

Note: This is PHP code

 

Join me on Google+                                                                                  

about Nikhil Parachure

Digital Marketing / Web &amp;amp; App Analytics expert with experience ranging from small businesses to very large portals. Across varied verticals like banking, travel, ecommerce, insurance. Google Adwords top contributor since 2013 and currently working with a leading Indian ecommerce portal. Aspiring writer, wants to be lighter!

Comments
Vinayak_Mudgal
February 2013

Hey Nik, Thanks for great post. Could you please share the consequences of not having mobile friendly websites? Will my ads be visible on mobile searches? If yes, where will visitors land on? Thanks Vinayak

Matthias
March 2013

This is great information but I need a bit more details. We have two subdomains one is for mobile and the other is desktop. For example, a desktop version of the site is: http://drwalton.handheldpage.com and the mobile version is http://drwalton.handheldpage.com/m. What would that look like in order for our ads to redirect to the right landing page? Thanks for your help.

theniks
March 2013

Ahh quite simple your destination url will be

http://drwalton.handheldpage.com/{ifmobile:m/}

So if user visits from mobile then he will automatically go to http://drwalton.handheldpage.com/m/

And if user visits from desktop he will go to http://drwalton.handheldpage.com/

Hope this helps

 

mateosquared
March 2013

Great! Thanks for the help.

Ralphknight
March 2013
A ok.
avish
March 2013

Thank you Nik.

 

Its really a very nice article and quite interesting too.

 

Warm regards,

dingtang66
March 2013

theniks wrote:

How to use Mobile and Desktop landing pages in Enhanced campaign.

 

  • Using {ifmobile} parameter in the url

This will work only if your mobile and desktop landing pages are in a particular structure.

 

For example if your desktop landing page is whatever.com and your mobile landing page is whatever.com/mobile/.

You can use destination URL as is whatever.com/{ifmobile:mobile/}

 

Now adwords will process this URL internally onclick and process it in following way

If click happens from Desktop then{ifmobile:mobile/} will not trigger and the landing page will be whatever.com/.

 

If click happens from mobile then{ifmobile:mobile/} will trigger and langing page will be like whatever.com/mobile/

This is easiest solution but requires a URL structure which you might not get on all websites.

 

  • Using {device} parameter

This will work in all kind of URL structures and doesn't need a particular type.

 

For example lets say your desktop landing page is whatever.com and your mobile landing page is mobile.whatever.com

In this case you will need to do bit of coding, don't worry just 16 lines of it  Smiley Very Happy

 

So in this case your destination URL will neither be whatever.com nor mobile.whatever.com, it will be a page hosted on whatever.com like whatever.com/destination.php?device={device}

 

Now when click happens from mobile Adwords will render this URL as whatever.com/destination.php?device=m

 

If click happens from tablet Adwords will render this URL as whatever.com/destination.php?device=t

 

If click happens from desktop Adwords will render this URL as whatever.com/destination.php?device=c

 

Here is a piece of code which redirects tablet and desktop users to desktop page and mobile users to mobile page.

This code also carries forward query string parameters so if you are using UTM parameters for tagging or autotagging you still have your data in analytics and there is no data loss due to redirect

Spoiler

<?php
$a = $_SERVER['QUERY_STRING'];
if (strpos($a,'device=m') !== false) {

$location = 'http://m.whatever.com/?'. '&' . $a;
}
else
{
$location = 'http://whatever.com/index.php?' . '&' . $a;

echo '<br />';

}
header ('HTTP/1.1 301 Moved Permanently');
header ('Location: '.$location);
?>

 

Note: This is PHP code

 

Join me on Google+                                                                                  


 

ChrisE
April 2013

Hi, 

 

Thanks for the great post.  I have destination urls:  

 

Desktop:  http://www.mysite.com/

Mobile:  http://www.mysite.com/sub-section/mysite-mobile

 

How would I set it up to redirect the person to the right site?  Thanks!

theniks
April 2013

HI Chris

you can do it in 2 ways

 

andy G
July 2013

What about if my site is set up as example.com and my mobile is m.example.com?

 

How could i incorporate this?


Thanks

Labels