Prosper202 Tracking202 Export202 WorldProxy202 Meetup202 | Blog Forum Newsletter Twitter | Advertise
Login · Register
Home About Docs Scripts Blog Forums Hosting Donate Download

Putting Dynamic Keywords in your Landing Pages

This shows how to dynamically display the keyword the user was searching for on your landing page. This is a simple script that prints the dynamic keyword on the page for users with Tracking202 installed. Below is an example landing page .php file that shows how to place dynamic keywords on your landing page!

Landing Page Code

<?

//grab t202 keyword
$keyword $_GET['t202kw'];

//if a yahoo keyword exists, over-write the t202 keyword
//for Yahoo OVKEY = the bidded keyword, OVRAW = actual keyword
//you can change $_GET['OVRAW'] to $_GET['OVKEY'] if you would
//like to display the bidded keyword, instead of the actual keyword.
if ($_GET['OVKEY']) { $keyword $_GET['OVKEY']; }  

//now anywhere we call echo $keyword, it will display the dynamic kw!

//extra goodie, uncomment the line below if you would like to capitalize 
//the first character in each word
//$keyword = ucwords(strtolower($keyword)); 

?>


<html>
    <head>
        <!-- Display the Dynamic Keyword in the Title! -->
        <title><? echo $keyword?></title>
    </head>
    <body>
    
        <!-- Display the Dynamic Keyword in the body's content! -->
        This is the content on my landing page! You were searching for <? echo $keyword?>.
    
    </body>
</html> 

Conclusion

Anywhere you now call <? echo $keyword?> in your .php file, it will print out the dynamic keyword insertion!

Responses

  1. Terrence on Jul 14, 2008 at 9:11am

    Great script!

    Question: Can I use this to get the bidded keyword as well?

  2. Wes Mahler on Jul 15, 2008 at 8:50am

    Sure, the above example should actually grab the bidded keyword, not the actual keyword.

  3. Andre Chaperon on Jul 16, 2008 at 6:01pm

    Wes,

    The "actual keyword" is the important one for me. The bid keyword I already know, of course.

    Is there a way for P202 to record this?

    Andre

  4. Wes Mahler on Jul 17, 2008 at 4:48am

    Well the ACTUAL KEYWORD is recorded for P202,

    But this script will print the BIDDED KEYWORD, on a landing page.

    So yes it already does it, P202 records the ACTUAL, not the BIDDED keyword.

  5. Ron Berg on Sep 03, 2008 at 4:31pm

    What does {keyword} capture? The actual query or the keyword triggered in the list of keywords?

    Thanks,

    Ron

  6. Steven on Sep 03, 2008 at 5:26pm

    Hi Ron,

    The actual query. It use to grab from the list of keywords but we've disabled that and went with the actual query since it is more accurate of what you would want.

  7. musignr on Sep 10, 2008 at 3:10pm

    Wes, I think this is exactly the script I need.

    I have 100s of keywords and want to setup a SINGLE landing page that displays content that is relevant to the users search term.

    So I insert <? echo $keyword; ?> wherever I want their search term to show up and I'm good. right?

    Also, will this method optimize the landing page for each keyword and help boost Quality Score? Or do you have to create static content pages for each keyword to improve QS?

  8. Wes Mahler on Sep 11, 2008 at 9:23am

    Yes you are correct, go ahead and test-it yourself on a live site, (you'll of course have to click on one of your text-advertisements)

    Although it may not increase your QS by leaps and bounds, it can't help but make it more targeted, you'll probably as well have to create static content, that'll help.

  9. Wes (MasterlessSamurai.com) on Sep 12, 2008 at 12:42pm

    The code above works for me if I have the t202kw variable in the URL. When I don't though, I get an error: Notice: Undefined index: t202kw.

    How could I change the code to say "if the t202kw exists, echo keyword, else echo (default keyword)" ?

    I dont want my users to see an error. Most of the time I'll have the t202kw variable in the URL anyway, but if I happen to get some natural traffic or type in, this is when they'll see an error.

  10. jDilleo on Sep 22, 2008 at 4:36pm

    MasterlessSamurai,

    You can replace

    $keyword = $_GET['t202kw'];

    with

    if(is_null($keyword = $_GET['t202kw'])) $keyword='defaultkeyword';

    That should do it.

  11. wowjoomla.com on Oct 25, 2008 at 3:14am

    I have actually created something like this for the Joomla CMS. It essentially displays the the message 'You came from Google looking for {keyword} you may be interesting in the following articles...' it then displays a string of articles.

    However is it my understanding that this can be used within any off the content on a page?

    Is there a way to have a default keyword already in the content (for those who come directly to the site]? For those who come via a search engine the keyword would change from the default.

  12. Mark Pivon on Oct 31, 2008 at 12:46pm

    This is excellent! Users may also be interested in a free script that I have created which creates personalized urls. The system pulls data from a database, and populates a template with the database info. So, users are greeted by name, and can even be served personalized images and text - all based on a URL without a login or cookies. Download a free version at http://www.DynamicURLS.com and keep up the good work!

  13. rcndaq on Nov 17, 2008 at 1:28am

    8r92u3 <a href="http://ilufmmkbafre.com/">ilufmmkbafre</a>, [url=http://aiwqewydhiik.com/]aiwqewydhiik[/url], [link=http://zeifnxxfvssm.com/]zeifnxxfvssm[/link], http://ftzvskswtmvh.com/

  14. Samuel on Dec 01, 2008 at 8:01pm

    Totally brilliant! That's what I wanted!

Leave a Reply

Name (required)

Email (will not be published) (required)

Website

What does 4 + 4 equal? (required spam filter)


Creative Commons License This work (Prosper202, Tracking202 and Export202) is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.