Welcome Guest, Not a member yet? Register   Sign In
Identifying Google Search Terms
#1

[eluser]shiroin[/eluser]
Hi,

I am currently building a photo website, and I would like to redirect visitors as they land based on the search term they used.


How can I get codeigniter to identify search terms?


Example:

A searches in google "Landscape Photos", my CI code identify that the visitor landed with the term "Landscape Photos" and will display landscape photos appropriately.

Thank you!
#2

[eluser]slowgary[/eluser]
You can use Google Webmaster tools to see what terms your site represents. You can also check the referrer to see what site they came from, and if it's google.com you could parse the URL to see what the search terms are.

That's how you would do it, but as far as the reason you want to do it, I think you've got it backwards. You want to determine what a user searched for on google to get to your site, then programmatically give them what they searched for. If a user searches for "Landscape Photos", the only way google is going to return your site to the user is if google has already determined that your site had appropriate content to match that search, so I don't really understand serving the user with other, dynamically determined content.

Just my two cents.
#3

[eluser]shiroin[/eluser]
u know some sites, when you enter search query in google, say 'codeigniter', then you goto the actual site, it will highlight all the words 'codeigniter' when you go to it.

how do i do that???
#4

[eluser]slowgary[/eluser]
Well... google does that for you when someone clicks on the "cached" link of a search result. If you want to do something similar on your own, you'd need to use the referrer header as mentioned above.

Check out: http://us.php.net/manual/en/reserved.var...server.php

You'd want 'HTTP_REFERRER'.




Theme © iAndrew 2016 - Forum software by © MyBB