Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Getting the Google search terms from a https Google search

I want to get the search terms that user typed on Google to get to my long-tail landing page (and use them on that page).

Getting the the "q" variable from the query string using the response referrer (in ASP C#) works well but only if the referring Google page was [b]not[/b] loaded as https.

This is obviously a problem due to the fact that almost everyone is logged in to their Google accounts on their browsers all the time and, if they are, all Google pages will be automatically loaded (and redirected) to use https.

When a user (on [b]https[/b]://www.google.com) searches for something and clicks on a search result, Google seems to redirect the user to an intermediate page that strips the request of its query string and replaces it with a different one that pretty much only contains url that the intermediate page should redirect to (i.e. the url to my long-tail landing page).

Is there any way that I can get the original search terms that were used on [b]https[/b]://www.google.com anyway? Maybe if javascript could access the browser history or something similar?

Thanks a million!
Sign In or Register to comment.