kiowa_jackson Posted March 5, 2008 Share Posted March 5, 2008 Google has several parameters when you search, the most interesting being the query http://www.google.com/search?q=pumpkin+pie&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a is there a way to capture the value of this at the landing page, if someone clicks through from the organic results? It doesn't look like google passes them on through the organic links, but I've heard you can capture it using javascript... Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted March 5, 2008 Share Posted March 5, 2008 i.e you are trying to track query strings that refer to your site? this is your best idea. 1) Get the refer ($_SERVER['HTTP_REFER']) 2) If the server is Google process it into mysql 3) Explode the REFER at the ? and then explode the second part (the query string at the = signs) foreach (query string) insert into mysql Then you can track it via mysql. Although google usually does this for u Quote Link to comment Share on other sites More sharing options...
discomatt Posted March 5, 2008 Share Posted March 5, 2008 Best way is <?php $ref = 'http://www.google.com/search?q=pumpkin+pie&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a'; $query = parse_url($ref, PHP_URL_QUERY); parse_str($query, $arr); print_r($arr); ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.