How to put keywords from google in the LP

Status
Not open for further replies.

Brookecoin

New member
Dec 30, 2008
15
0
0
Hey guys!!!

How do I bring the keywords from the search in google to the landing page?
How do I make it appere as the landing page real title (not meta tag).


Is there a different if I wanna bring the keyword from PPC to the page? (I mean that I wanna know how to put the keyword that initiated the ad to the page.

Thank you in advance.

Brooke
 


This is primarily a guess, but utilizing just about any server sided scripting language such as PHP, one could pull $_SERVER['HTTP_REFERER'], to grab the referring url, which would contain keywords in the address. Parsing these out you could design a script to grab related content from a database, or generate it on the fly.

So for example, if books was the keyword, and the resulting query url was books - Google Search

you could pull q=, and assign it to $q , and then in the title <title>All about <?=$q;?></title>

Thats one way I speculate that they do that.

I googled for the code real quick as I know I seen something in the paste, apparently this little tidbit was posted over at DP back 2005 (works for any search engine that uses q= in the url for keywords).

Code:
$parse = parse_url($_SERVER['HTTP_REFERER']);
$se = $parse["host"];
$raw_var = explode("&", $parse["query"] );
foreach ($raw_var as $one_var) {
    $raw = explode("=", $one_var);
    $var[$raw[0]] = urldecode ($raw[1]);
}
$se = explode (".", $se);
switch ($se[1]) {
    case 'yahoo':
        $keywords = $var['p'];
        break;
    case 'aol':
        $keywords = $var['query'];
        break;
    default:
        $keywords = $var['q'];
}
unset($parse, $se, $raw_var, $one_var, $var);

Resulting with the variable $keywords being populated with keywords.

And this source is in dutch, but it pulls keywords from a very large list of search engines.
http://blog.ericbruggema.nl/2008/09/23/zoekwoorden-uitlezen-van-bezoekers-via-zoekmachine/
 
Thx kblessinggr,
It worked great!!!
I tested it for search do you think it will work for traffic from adwords?

Brooke
 
Thx kblessinggr,
It worked great!!!
I tested it for search do you think it will work for traffic from adwords?

Brooke

(I never used adwords so...)

I don't think adwords has any keywords transfered over from the banner to the site. But I think there should be someway of checking the host its coming from to see if its an adword traffic.

But in any case you should at least have something rigged up just in case you either get direct traffic, or traffic without compatible keyword query string.
 
Hey guys!!!

How do I bring the keywords from the search in google to the landing page? How do I make it appere as the landing page real title (not meta tag).

Here is what I do, you will need php pages for this to work. Once I have my page built I put this bit of code everywhere I want the keyword to appear. Title, meta, h1 and usually a time or two in the copy. However, with certain keywords it can look and or read funny.

Code:
<?php
if ($_GET['kw'])
{echo htmlentities($_GET['kw']);}
else
{echo htmlentities('default text');}
?>
where you see 'default text' put in a keyword or phrase that will show up if the traffic is organic. Then I setup my destination urls like this

hxxp://mysite.com/lander.php?kw=keyword here

I use the shit out of excel for this. Worked good for me. Word
 
Here is what I do, you will need php pages for this to work. Once I have my page built I put this bit of code everywhere I want the keyword to appear. Title, meta, h1 and usually a time or two in the copy. However, with certain keywords it can look and or read funny.

Code:
<?php
if ($_GET['kw'])
{echo htmlentities($_GET['kw']);}
else
{echo htmlentities('default text');}
?>
where you see 'default text' put in a keyword or phrase that will show up if the traffic is organic. Then I setup my destination urls like this

hxxp://mysite.com/lander.php?kw=keyword here

I use the shit out of excel for this. Worked good for me. Word

As far as I know, google doesn't send a kw value to the destination page, you have to pull it from the referral of the search engine which is usually q=.
 
As far as I know, google doesn't send a kw value to the destination page, you have to pull it from the referral of the search engine which is usually q=.

Using the 'q=' method gets you the actual query string from the search box. So if I typed "I hate red widgets" and it matched your PPC ad for "red widgets" your page would have "The best thing about I hate red widgets is that they're red" and so on.

If you construct your PPC ad destination URLs to send 'kw={keyword}' you will get whatever keyword the query matched, not the query itself. So in the above example you would get "The best thing about red widgets is that they're red."

It all depends on what you're trying to do. You could also use the query method, and then parse it for keywords to display a match. So you could take the query, search it for the keyword 'red' and then display something about red widgets, or blue, or green... whatever.
 
Using the 'q=' method gets you the actual query string from the search box. So if I typed "I hate red widgets" and it matched your PPC ad for "red widgets" your page would have "The best thing about I hate red widgets is that they're red" and so on.

If you construct your PPC ad destination URLs to send 'kw={keyword}' you will get whatever keyword the query matched, not the query itself. So in the above example you would get "The best thing about red widgets is that they're red."

It all depends on what you're trying to do. You could also use the query method, and then parse it for keywords to display a match. So you could take the query, search it for the keyword 'red' and then display something about red widgets, or blue, or green... whatever.

Right, which makes sense if the traffic is PPC, since you can construct the the url. I was referring strictly from organic search traffic sense.

I guess lack of specification on Lickity_Split's part could have been better, since his method would work well for adword and other PPC traffic.
 
Right, which makes sense if the traffic is PPC, since you can construct the the url. I was referring strictly from organic search traffic sense.

I guess lack of specification on Lickity_Split's part could have been better, since his method would work well for adword and other PPC traffic.

I meant to specify that this method was for use with adwords, as brooke asked if your method would work with adwords. My bad...so yea, that method works great for ppc, because, like you said, you can construct the destination url. I apologize if I wasn't more clear earlier, this method will not help so much with organic traffic, it can pass a static phrase or keyword in the 'default text' area. However, that information is static and won't change with the code posted above.

Edit: I see why I made little sense, I was responding to the question about it working on adwords
 
Using the 'q=' method gets you the actual query string from the search box. So if I typed "I hate red widgets" and it matched your PPC ad for "red widgets" your page would have "The best thing about I hate red widgets is that they're red" and so on.

If you construct your PPC ad destination URLs to send 'kw={keyword}' you will get whatever keyword the query matched, not the query itself. So in the above example you would get "The best thing about red widgets is that they're red."
For the latter example, kw={keyword}, don't you mean you would get "red widgets"?

Sean
 
Status
Not open for further replies.