SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm developing a website that will have a list of the top 10 accessed website on the client's sharepoint site.

Is there a way that i can generate a XML file containing the information i need, much like the list on the Sharepoint Web Analytics? (http://vm-sharepointapp:8080/_layouts/WebAnalytics/Report.aspx?t=TopPageForPageReport&l=wa&id=http%3a%2f%2fvm-sharpeointapp%2f&WebAppName=SharePoint%20-%2080)

That way my application can read this XML file and publish it on the website.


share|improve this question
up vote 1 down vote accepted

Please note, that you can run analytics reports at one of 4 different scopes: Farm, Web Application, Site Collection, and Site. The Farm/Web Application scoped data is available via Central Administration. The Site Collection/Site scoped data is available within each Site Collection/Site.

Based on the url you have shared, it appears that you are trying to get at a Web Application's "Top Pages" report (via Central Administration).

The bad news is that this data is not available through any APIs, nor is it stored in a database where it is supported to be queried directly. The best you could do is export this to a Spreadsheet (using the Analyze tab in the Ribbon). After it's in the Spreadsheet you have a few options, none of which are fully automated:

  1. Upload it to a content area and access the data in it via Excel Services APIs.
  2. Import the data into a (SQL) database that you own and can write your own queries against.

Use a tool like Fiddler to see if you can get at the Web Request being generated to Export the spreadsheet. This may help in getting it more automated.

Remember, by default, the data in this report is updated nightly, so you whatever you come up with your users will be looking at day old data, so you don't need something pulling "live" data.

If you are curious about this, and want to see where the data is coming from, you can do some detective work to track this down. For example, turn on SQL Profiler and trace the queries. It should be pulling from the Web Analytics Reporting (not Staging) DB. Please note, however, that it is not supported to read from the Web Analytics database. Doing so can cause harm to your farm and leave you in an unsupported state. It is only supported to directly query the Usage and Health Data Collection database in SharePoint:

share|improve this answer
Thanks a lot for the information, Brian. It's kinda sad though, that Microsoft doesn't give us a API to access that information. I'm checking the possibility to develop some sort of 'hit counter' and put it on the master page, and this, let's call it 'thing' would save the URL in a list or database and then i'd be able to check the top visited pages in a easy way without doing anything 'wrong' with Sharepoint. – C. Hoffmann Mar 5 '12 at 14:22
If you are tracking page views, I don't know about a SharePoint list to store that data. Why not leverage one of the analytics frameworks out there, like from Google: I think you can get at them free/cheap, and all you need to do is insert a little javascript into your master page (or page templates that render the pages you are interested in tracking). – Brian Mar 6 '12 at 17:37
Also, this is a great read and may also be helpful if you don't want to go with an existing service:… – Brian Mar 6 '12 at 17:37
Remember, by default, most of the _layouts pages use the same master page as regular content pages. So, when navigating settings pages, you could skew your page hit/site usage stats. Might be helpful to turn off the setting that allows your _layouts pages to use the same master page, or in your master page detect if you are in _layouts, then register the "hit" or "view". – Brian Mar 6 '12 at 17:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.