How to count the no. of hits on the website.

Posted on 2013-02-02
Last Modified: 2013-02-21
1. How to determine no. of visitors visiting the site.
2. How to determine the ip address of the client machine from where the site was accessed.
3. What is code for implementing Visitors Count logic.
Question by:searchsanjaysharma

Accepted Solution

esolve earned 167 total points
ID: 38846871
You can use this on your website to determine the visitors IP address:


For the visitorCount you can use the Application_BeginRequest event in global.asax. See this link. or you can use a free jscript visitor counter

Some more examples here:
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 166 total points
ID: 38847015
The best choice is to use AWStats or a similar program that gets all that info from your server logs.  It is open source and you can get the code for it.
LVL 10

Assisted Solution

by:Monica P
Monica P earned 167 total points
ID: 38850306
Visitors Count

To get client IP

To get the IP address of the machine and not the proxy use the following code

Open in new window


Author Closing Comment

ID: 38914018

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
New to SOAP and need some direction 10 78
Help with C#, MVC, razor. 6 34
SqlDataBase 7 46
tableview is not updating 1 7
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question