I am developing my own blog site in ASP.NET and I would have several blogs in future. I want to have a widget on page which will show the number of user visited to my page based on the URL {Because for every every blog I will a unique URL}, so that the new user could know that the blog has been visited how many times!

I can make the same via coding, very easily, but I have database size restriction from my hosting provider and I can't go beyond that !!

Please assist !

  • 1
    Are you trying to count visits to an individual page, or to the website in total?
    – Ciaran
    Apr 8, 2011 at 6:54
  • @Ciaran Yes, for each page !!
    – Chris
    Apr 11, 2011 at 6:04

1 Answer 1


I think the easiest way to achieve this would be to increase the database size from your hosting advisor. However, you can do it using Google Analytics as your data store.

Using the Google Analytics API to retrieve page views

  1. add the Google Analytics tracking script to your website
  2. Use the Data Export API to authenticate with Google, which will allow you to query for your analytics. Get started here: http://code.google.com/apis/analytics/docs/gdata/gdataDeveloperGuide.html
  3. using the Data Feed Query Explorer, construct a query that returns the number of page views to a given page. You can filter using the ga:pagePath dimension. AN example query is given below.
  4. Put it altogether to create an embeddable script that takes the current page as a parameter and passes it to the Data Feed Query

Data Feed Query Explorer Example

This example returns the Page Path and Page Views for the home page - "/". You will have to supply your own Google Analytics Table ID (e.g. ga:123456)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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