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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C# Formatting DateTime String Value 5 69
Coding for the first time 9 103
Updating a single record in forEach using C#/Entity 7 39
C# Change the instruction to user. 11 39
Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
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…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

759 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