KC Lemson

By KC Lemson [MS]

Blogs

How to view HTTP Referrers on your sharepoint site

  • Comments 3
  • Likes

Ewan just clued me in to something nifty: you can get HTTP referrer data in your sharepoint site, just go to http://server/sites/nameofsite/_layouts/1033/usagedetails.aspx.

To get there in the UI:

  • Click on Site Settings (by default at the top of the page)
  • Go to Site Administration“
  • View site usage data“

Although it doesn't give me quite the depth of detail I was hoping for, it's still quite handy... for example, since all the users of my intranet site are authenticated, I can even see the names of the people who visited the site and when. That helps me determine if the site is sticky enough. And of course, as a blogger I always find referrer data fascinating.

(BTW, I'm using Office SharePoint Portal Server 2003)

Comments
  • If it's not detailed enough, then roll your own logger :)

    You can hook into the Application_OnPostRequestHandlerExecute event in global.asax which fires after every page asp.net handles (so, unless you setup a handler for .html, .doc and so on, you won't see those). Then save the HTTP_REFERER field away into a database and you have instant logging, where you don't have to add anything to your individual pages.

    I documented a simple logging class at http://idunno.org/dotNet/loggingReferrals.aspx

  • For that to work, you first have to go to the Central Administration page and click on Configure usage analysis processing under Component configuration and make sure Enable logging and Enable usage analysis processing are both checked. I think logging is on by default, but usage analysis is not.

  • Also, it will take a day to see the usage stats after they are enabled, since they're only processed once a day.