: Number of visitor widget 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
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 !
More posts by @Shelton105
1 Comments
Sorted by latest first Latest Oldest Best
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
add the Google Analytics tracking script to your website
Use the Data Export API to authenticate with Google, which will allow you to query for your analytics. Get started here: code.google.com/apis/analytics/docs/gdata/gdataDeveloperGuide.html 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.
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)
www.google.com/analytics/feeds/data? ids=[your-GA-profile]&
dimensions=ga%3ApagePath&
metrics=ga%3Apageviews&
filters=ga%3ApagePath%3D%3D%2F&
start-date=2011-04-08&
end-date=2011-04-08&
max-results=10
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.