Dynamic keyword content in AdWords landing pages

If you want a simple approach to getting dynamic keyword content in AdWords pages, this is just what you need! It’s short and sweet, using php.

As always, when using php code within your web page, remember to give it an extension of .php instead of .html.

Firstly, your page will need to know what keyword was used in the search. You can either specify this explicitly for each keyword with a query parameter, or use something like the following at the end of your URL:

?kw={KeyWord}

If you already have any query parameters in your URL, you will need to replace the question mark with an ampersand symbol “&” when you add this parameter to the end of your URL.

To add this keyword to your page wherever you like, just use the following code:

<?php echo $_GET["kw"]; ?>

What happens if the page was accessed without a query parameter? In this case, you would get nothing output. If you want to guard against this, providing a default for the case that no query parameters have been specified, use the following code at the start of your page:

<?php
if (!isset($_GET["kw"])) {
  $_GET["kw"] = "default keyword text";
}
?>

Replace default keyword text with whatever you would like to appear if the keyword has not been specified in the query string.

Just make sure that if you use this technique, you only bid on keywords that give you a page that makes sense. If you use the {KeyWord} shortcut, don’t bid on misspellings and the like, because your page will contain those misspellings. If you are bidding on misspellings, write out your URLs in full.

David Thomas, The Affiliate Marketer

Leave a Reply

 

Spam Protection by WP-SpamFree

Powered by eShop v.6