Now, before I start this post, let me make it perfectly clear. I am not a PPC expert, I am through and through an Organic SEO but occasionally I end up setting up the odd PPC campaign or two and I think this is probably one of the coolest things you can do with adwords so I thought I’d share.
It’s possible to create dynamic Google adverts containing your keywords, this is fairly common knowledge but let’s go over it just so we all know we’re on the same page.
The syntax for Google AdWords Dynamic Keyword Insertion is {keyword: }
You can also use the following capitalisation on the work ‘keyword’ to get different effects:
Make sure you put a generic “catch all” phrase after the : so make sure it shows something if your keyword string is too long for example {keyword:Jim Is Awesome}.
Now, here’s the very clever part and what separates the PPC men from the boys or the PPC Women from the girls.
Dynamic adverts are one thing, but what about if you were able to create a dynamic landing page that contained your keyword? One page that rewrote based upon the keyword the person had searched for, instantly making the page relevant to the searcher, how cool would that be, in fact, so cool, let’s do it!
To do this you’ll need a little PHP knowledge (or awesome copy and paste abilities)
Create your page, and then put this code snippet at the beginning of the page.
<?php
// replace
$replace = "Catch all keyword here";
// check to see if there is an adwords search term present
if (isset($_GET['q'])) {
$replace = preg_replace("/-/", " ", $_GET['q']);
}
$title = ucwords(strtolower($replace));
$h1 =ucfirst (strtolower($replace));
?>
Now, everywhere you want your keyword to appear in the text (try and put it into the page content and not just the title), use this:
<?php echo $title; ?>
so far so good. Make a new directory and save your page as index.php in that directory
Now give it a try. Go to your page and use ?index.php?q=your-keyword-here
and magically the code strips out the dashes and page content changes to include that keyword wherever you’ve specified.
How cool is that. Let’s go one better, no one likes a ?keyword url, so lets tidy that up using our old friends mod rewrite and htaccess to make it seem like this page is especially for the person searching for your keyword.
If you’ve not played with your htaccess files before, there’s a post here on a few of my favourite tips and tricks but for this post, create a blank htaccess file in your new directory
paste in this code:
RewriteEngine On
RewriteBase /yourdirecotry
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+).html?$ index.php?q=$1 [L]
changing your rewritebase to your new directory, save this file as .htaccess in your new directory.
Now check it out, the URLs are nicely rewritten so you can do it this way
http://www.yoururl.com/basedirectory/I-love-Jims-Turorial-on-dynamic-landing-pages.html
How cool is that???
Now just go back to adwords and set your landing page as http://www.yoururl.com/basedirectory/key-word.html and adwords will replace the keyword and your code will render it beautifully into a lovely landing page. Here’s a few examples (forgive the lack of design):
Recent Comments