count website traffic - asp.net

hey, i was just wondering how would I go about monitoring or measuring the number of hits my website gets. I want to do this from code as opposed to downloading a plug in to the page. It is an asp.net website. Any tutorial or code suggestions would be nice. thanks in advance.

You want to check out Google Analytics, they are awesome, and one line of code to add!
It's what I use for all the websites I manage!

You could also have a look at installing AWStats, which works by reading your web servers logs. All you need to do it change the logging settings on your server (IIS if your using Windows Server), install AWStats, which runs as a separate website, and schedule the collation of stats with a scheduled task.
Advantages: More in depth stats, particularly with visitors IP address which Google does not collect.
Disadvantages: More effort to get up and running.

The best way to monitor traffic and other important metrics is to use Google Analytics. Not only can you see historical numbers for your site, but you can monitor traffic in real-time. Additionally, you can track conversions (sales) from ads or outside links.

Related

how to load test wordpress site?

How I can test the performance of my site. I need to check either more than 400 users can access the site at a same time and purchase one product. Need to test one special product to be sold. Which may be more than 500 users will buy at once.
How I can simulate the transactions in order to load test the site.
It will be better to create an automated load test script either in Jmeter or any other tool and you can generate as much load you want.
Handling number of users by website not depends on WordPress but it depends on which server(web hosting) you are using.
While what depends on WordPress is website performance. The more number of extra plugins, not well developed theme and ignored WP standards can make site performance slow.
You can check your website performance at:
Google insights
GT Metrix
Pingdom
Here is the link for your reference to send test traffic to your website:
Test traffic
Hope this helps.
Looking into A Beginner’s Guide to Load Testing WordPress Sites:
Check Your WordPress And Front End Setup Before Testing (use GTmetrix, PageSpeed insights and P3 plugin to check whether your frontend part is up-to-speed
Document And Tune Your Back End Stack: you need to ensure that all the infrastructure is ready for high loads: operating system, web server, database, load balancer, etc. - all of them needs to be tuned for the high performance
Exploring DIY Load Testing Options. Choose a load testing tool and implement the real life usage of your application. Once you do this you can replay the test with increased number of users and explore the metrics

Is there a way to stop AMP Analytics counting development work as hits?

I have added AMP Analytics (amp-analytics) to my AMP Pages like these and the hits are recorded properly on Google Analytics. The only problem is that it is counting all my development work as hits. This will really skew my readings as many people work on the development version.
Is there a way similar to that in this answer where I can make this script run only if it's in the production domain?
You can use a filter in the Analytics view settings to exclude hits from the development environment (i.e. by hostname or page path).

Determine the total number of hits on an Elastic Beanstalk application

I'm running a flask app on AWS's Elastic Beanstalk. I'm wondering if there's any way for me to determine the total number of hits that my website has received. Does anyone know whether this is possible?
I use Google Analytics (analytics.google.com) to track my websites' traffic. It's pretty simple to use. You add your website to your Analytics account, and it gives you a javascript snippet that you can paste onto a web page.
The general practice is to paste the snippet into a base template so it appears everywhere on your website.

Software for tracking how popular a web site is

Is there a (free!) software/components that I can use to track how my web site is being used - which pages are most popular, how many times was the site visitied today, yesterday etc...
How about Google Analytics? http://google.com/analytics
The information you want is (mostly) in the server logs, so I'd ask the server admin to give you access to some statistic-script (if it's installed).
Here's an open software for website analytics:http://www.openwebanalytics.com/
And you can - of course - always give your data to Google and let them generate the statistics using "Google Analytics". It requires including a piece of code into your website.
AWStats is a good option, but +1 for Google Analytics.

What does it mean when I see some IPs look at hundreds of pages on my website?

What should I do when I see some IP in my logs scrolling through 100s of pages on my site? I have a wordpress blog, and it seems like this isn't a real person. This happens almost daily with different IPs.
UPDATE: Oh, i forgot to mention, I'm pretty sure it's not a search engine spider. The hostname is not a searchengine, but some random person from india (ends in '.in').
What I am concerned with, is if it is a scraper, is there anything I can do? Or could it possibly be something worse than a scraper e.g. hacker?
It's a spider/crawler. Search engines use these to compile their listings, researchers use them to figure out the structure of the internet, the Internet Archive uses them to download the contents of the Internet for future generations, spammers use them to search for e-mail addresses, and many more such situations.
Checking out the user agent string in your logs may give you more information on what they're doing. Well-behaved bots will generally indicate who/what they are - Google's search bots, for example, are called Googlebot.
If you're concerned about script kiddies, I suggest checking your error logs. The scripts often look for things you may not have; e.g. on one system I run, I don't have ASP, however, I can tell when a script kiddie has probed the site because I see lots attempts to find ASP pages in my error logs.
Probably some script kiddie looking to take advantage of an exploit in your blog (or server). That, or some web crawler.
It's probably a spider-bot indexing your site. The "User-Agent" might give it away. It is possible to have 100s of GET requests easily for a dynamically generated Wordpress site if it isn't all blog pages but includes things like css, js and images.

Resources