HOW TO find from which search engine and with what search keywords visitors to your website are coming

Knowing what visitors to your website did last summer may not be easy but it is easy to find with a little programming from which search engine they have come and with what search keywords.

If you are looking for help on let's say "xsl recursion" and land on an IBM Developer knowledgebase article through Google, you will notice a hyperlink on the page - "More dW content related to: xsl recursion" that will lead you to its search page showing other relevant pages. The detection & dynamic generation of the hyperlink on the client side is done by a nifty piece of Javascript (which you can view through your browser with the menu option View > Source)

You can also detect this with ASP.NET using the Uri Class properties on the URL Referrer.

Both Google and MSN Search engines use the the query string variable "q" to hold the keywords submitted by the user while Yahoo Search engine uses "p"?! After you have hit the Search button, the Google Search url looks like this - http://www.google.com/search?hl=en&q=JSON+hijacking&btnG=Google+Search

You can find the URL Referrer using the Request.UrlReferrer property ( Uri MyUrl = Request.UrlReferrer; ), the host name (MyUrl.Host) and the querystring (MyUrl.Query). The search keyword information thus extracted can be processed to personalize the page & "cross-sell" other related pages by displaying them as hyperlinks.

Comments

  1. Hi Anil,

    Hey thtz an Interesting post, but i am sure, you are aware of Google Analytics (www.google.com/analytics) than a few line of code appending will do all the analysis, with benefits of All you have mentioned and more and that all FREE., than is it feasible to go with??? Can you please mention few more advantage, so that it can be concluded.

    Good work.
    DotNetGuts (DNG)
    http://dotnetguts.blogspot.com

    ReplyDelete
  2. Google Analytics is no doubt good for site analysis. However, if you want to customize pages on the fly with links to other interesting content on your website related to the search keywords that the user has submitted then your code would have to know the search keywords at that point of time. So this essentially helps to personalize the page & promote other pages of your website.

    ReplyDelete

Post a Comment

Popular posts from this blog

Maven Crash Course - Learn Power Query, Power Pivot & DAX in 15 Minutes

"Data Prep & Exploratory Data Analysis" course by Maven Analytics

Oracle Cloud Infrastructure 2024 Generative AI Professional Course & Certification Exam (1Z0-1127-24)