dyanmic keyword insertion for landing pages

Status
Not open for further replies.

clownstep

Banned
Mar 7, 2008
138
0
0
I'm trying to figure out how to use dynamic keyword insertion on my landing for Google to improve QS and create targetted landing pages.

I found this site: http://hamletbatista.com/2007/06/08/dynamic-keyword-insertion-for-landing-pages/

Theres a zip download with the files but, what I'm unclear about is do I have to use the template html that came with the other 2 files. Or can I just upload the 2 files to my webhosting then on my landing page just type in {{ keywords }} wherever I want dki?

I e-mailed the person but, I don't know if I'm going to get a response or not, if somebody has another method of doing this, I'd really appreciate it.


Thanks!
 


I'm assuming we are using php

your destination url:
Code:
 hxxp://yourdomain.com/index.php?adgroup={adgroup}&subid1={subid1}&subid2={subid2}

To pass the variables use the code below somewhere in your LP (such as title, h1, body, whatever). Just call them with this code:

<?php echo ucwords(str_replace("-", " ", $_GET["adgroup"])); ?>
<?php echo ucwords(str_replace("-", " ", $_GET["subid1"])); ?>
<?php echo ucwords(str_replace("-", " ", $_GET["subid2"])); ?>

Note:
1. ucwords = first letter of each keyword(s) capped
2. str_replace = all lowercase
2. strtoupper = all uppercase


You can change/remove/add the classes such as "adgroup", "subid1", "subid2" as you wish, but don't forget to implement it in your destination url and LP.

Optional:

To make your URLs neater you should modify your .htaccess to rewrite your URLs so that the same URL above works with this new URL:
hxxp://yourdomain.com/{adgroup}/{subid1}/{subid2}

open your .htaccess and add this:
RewriteEngine on
RewriteRule ^([^/\.]+)/([^/\.]+)/[^/\.]+)/?$ index.php?adgroup=$1&subid1=$2&subid2=$3 [L]

Attention: change the index.php file name to whatever you called your landing page template file.
 
Status
Not open for further replies.