If you have any PPC campaigns through Adwords, you might find echoing the term a user typed in on Google very handy. If someone clicks your ad, you can then show the exact search term they searched for on your page. This can only help to increase conversions and boost sales, as, to the user, they’re seeing exactly what they searched for.
For example, if you search for “Goodmans Wall Brackets” or “Goodmans Wall Mounts“, you’ll see that many companies, including ours, have got adverts either at the top or on the right column for both the above phrases.
Say the user typed it the latter (Goodmans Wall Mounts), and then they clicked your ad, and they arrive at a page advertising Goodmans Wall Brackets, there is a possibility they may get a little confused and leave your page and say goodbye.
Of course, to any normal human being you’d know that mounts and brackets are the same thing - however, why not eliminate any confusion whatsoever… you might as well just echo the term they searched for on Google on your page with a simple bit of PHP! This not only applies to PPC, but if your SEO is right up there, it can also be utilised for organic search results too.
<?php
$referer = strtolower($_SERVER['HTTP_REFERER']);
// see if it comes from google
if (strpos($referer,”google”)) {
// delete all before q=
$a = substr($referer, strpos($referer,”q=”));
// delete q=
$a = substr($a,2);
// delete all FROM the next & onwards
if (strpos($a,”&”)) {
$a = substr($a, 0,strpos($a,”&”));
}
// decode the results
$raw_keywords = urldecode($a);
define(’SITETOK’, “site:”);
if (strpos($raw_keywords,SITETOK) === false) {
$keywords = $raw_keywords;
} else {
$key_arr = explode(’ ‘, $raw_keywords);
$keywords = ”;
foreach ($key_arr as $key) {
if (strncmp($key, SITETOK,strlen(SITETOK)) == 0) continue;
$keywords = $keywords . ‘ ‘ . $key;
}
}
$key_arr = explode(’ ‘, $keywords);
$search_keywords = ”;
$keywords = ”;
$unStrictReplace = ‘[<>]‘;
foreach ($key_arr as $key) {
if (empty($key)) continue;
$key = ereg_replace($unStrictReplace, ”, $key);
if (empty($search_keywords)) {
$search_keywords = $key;
$keywords = $key;
} else {
$search_keywords = $search_keywords . ‘+’ . $key;
$keywords = $keywords . ‘ ‘ . $key;
}
}
echo $keywords;
}
?>
Give it a go, just paste in the code above and watch it work on your site…












0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment