25

Apr

Serve different content based on search referrals?

Posted by stuart as web development, php

I haven’t actually tried this, but I’m starting to think more and more that it might be a good idea…

What if you were to serve different content to visitors who come to your site via a search engine, based on what search terms they used to find your site?

Let’s say, for arguments sake, that a person came to your site after searching google for the term “red four inch high widgets”, the referral to your site would look something like:

http://google.com/search?q=red+four+inch+high+widgets

We could, in theory, serve that person a list of all the widgets that they might be interested in based on their search string: all our red widgets, all our four inch high widgets etc.

The content we serve them might look something like this:

Hi there, it looks like you’re searching for red four inch high widgets. Based on what you’re searching for, we think you might also be interested in these other products we have: (insert list of related products here.)

A basic php script to do something like this might look something like this:

<?

$referrer = $_SERVER[”HTTP_REFERER”];

if (strstr($referrer, ‘red widgets’)) {

echo ‘whatever content you want to show people looking for red widgets’;

}

?>

I wonder what sort of difference this would make to conversions on a website?

4 comments so far

It could be useful for article titles :).

Very nice blog with interesting articles. I will continue reading this blog in the future.

Thats a great idea. If your visitors found your site by a search engine, then we should give them the content that they were searching for. By parsing the search query a site could serve up some content that is related to the search query, in addition to the content that normally exists on the page.

Yeah, definitely a great idea, I think it’d prove to be very useful for large MadLib type database sites.

Never thought of it, really!

Leave a Comment:

Name (required)
Mail (will not be published) (required)
Website
Message