homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Marketing and Biz Dev / Keyword Discussion
Forum Library, Charter, Moderator: open

Keyword Discussion Forum

keyword referrals

Msg#: 4224578 posted 5:22 pm on Oct 31, 2010 (gmt 0)

Is the keyword a user uses to find a web site through a search engine accessible in any way?

In my site statistics, there is a list of keywords that users have used to find my site through varous search engines so obviously the keywords are getting passed to the server. I was just wondering if they were accessible in some kind of variable? I use php.

Im thinking along the lines of if a user visits my page using keyword 'blue widgets' then a blue widget image is displayed, if the keyword they use is 'red widgets' then a red widget image is displayed instead, is this possible?



Receptional Andy

Msg#: 4224578 posted 10:44 am on Nov 3, 2010 (gmt 0)

Hi shadowlight, you certainly can access this information. The URL of the user's previous page is contained in the $_SERVER['HTTP_REFERER'] predefined variable [php.net].

You then need to extract the keyword from the search engine's URL, e.g. for Google:


You can use various methods to grab this info - one would be to split the string based on the question mark and & symbols (if they exist) or you could use a regular expression.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Marketing and Biz Dev / Keyword Discussion
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved