2

There are several tools that help to analyze the users behavior on your website. I would tend to divide them into ones that live on an own platform and which can be accessed through and API (like Google Analytics) and that ones that are to be installed on your own server (like Piwik).

I will launch a new web project soon, which requires such a tool and thus I wonder which one I should use. In my case I need to collect the data on my own server, so I will have to stick with the second type of tools. After playing around a little bit on my beta server I considered Piwik to be pretty nice to personalize, but until now, I had issues to set up piwik on the production server, because it is a windows server and the piwik version that is available at the webapp installer platform of windows server requires a different php version.

Installing Piwik on another - let's say - analytics server, is not an option for me, because I don't want to create all this https traffic, just because I am not able to set it up on my production server. And I also don't want to purchase another https certificate ;-).

I browsed the Windows Webapp Installer Platform in hope of something that just works out of the box in Windows. Similar questions like this also propose Google Analytics or Piwik. But this cannot be it, can it?

So..

  1. Is there a tool which all you Windows Server people use?
  2. Are there other tools that are used frequently?
  3. Or even: Is it somehow possible to set up Piwik on a Windows Server without using The windows Web App Installer? I posted a related question here that focusses on the installation of piwik.
Community
  • 1
  • 1
Milla Well
  • 3,193
  • 3
  • 35
  • 50

1 Answers1

0

Logparser is a free tool from Microsoft that lets you throw direct SQL queries to the IIS Logs generated on your Web server. You may use it to query basic stats such as:

[1] From what ip-address range I get the maximum queries? (users' country-profile)

[2] What particular pages (aspx/html) are most frequently visited?

[3] At what time of the day, do I get the maximum requests?

I remember using this tool in one of my earlier projects, but the reason was to track down some performance issues. Also, the tool itself is console based, so you need to be familiar with command-line. However, a GUI front-end could be easily developed in a high-level language such as C#, I think there should be already some, that are free to download

Prahlad Yeri
  • 3,567
  • 4
  • 25
  • 55
  • The abilities of Logparser are limited to underlying data, this is not more than whats in the log files. AFAIK it is not possible to analyze session data, or data from the database. I gave Logparser a little try but found it such painful to use, that I switched to writing my own log parser in python. But I still got no session information. I still search for a better way. Thanks for the advise – Milla Well Mar 01 '13 at 22:26
  • 1
    Hi Milla. You can enable extended-logging to add additional fields by using the IIS Snap-in. But by default, IIS will not store the session information in the logs. You see, sessions are handled differently by each framework or language used. ASP.NET has a different way of handling sessions than ASP or PHP. So, you have to customize the logging in your web-application during the start and end of sessions. For instance, in ASP.NET you may call HttpResponse.AppendtoLog() method to write your session information to the IIS logs in the Session_Start() or Session_End() events. – Prahlad Yeri Mar 02 '13 at 07:04
  • For more information on HttpResponse.AppendtoLog() method, see this MSDN Link: msdn.microsoft.com/en-us/library/system.web.httpresponse.appendtolog%28v=vs.71%29.aspx – Prahlad Yeri Mar 02 '13 at 07:05
  • I worked this out now finally. Thanks! So now I log the session data with the Advanced Logging tool for IIS. But the user data is hashed in this session string. How can I extract the username for example? (I use Codeigniter and DX_AUTH for session management) – Milla Well Mar 07 '13 at 21:37
  • Hmmn. Decrypting the username doesn't seem to be a feasible option as the values are hashed using Microsoft's state-of-the-art crypto technologies. An easier way (as I mentioned earlier) is to manually log the username in the Session_Start() event procedure when it is already in decrypted stage. All you have to do is change the Global.asax code as below: (this file is in your web-application root directory) – Prahlad Yeri Mar 09 '13 at 06:13
  • using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\InetPub\wwwroot\LOGFILE.txt", true)) { file.WriteLine(@"CUSTOM_LOG: User " + Session["UserName"] + " Logged in at " + System.DateTime.Now.ToString()); } – Prahlad Yeri Mar 09 '13 at 06:21
  • The above code will write a custom log along with the logged-in username and time of login. Just replace the path to LOGFILE.txt with the path on your system. Also, change the session key Session["UserName"] if it is any different than that – Prahlad Yeri Mar 09 '13 at 06:22
  • Hey, thanks this sounds like a really good way to do it, but there is no Global.asax file in my root, and when I add one, the server crashes. If I search for the Global.asax file, I get many results. How to find out, which one do I have to edit? – Milla Well Mar 09 '13 at 13:19
  • ah, the Global.asax File is only for ASP.NET, I am running PHP, Codeigniter so there is likely another way to do it. I could simply log, whenever I rewrite a session. Is that the appropriate way to do it? – Milla Well Mar 09 '13 at 13:27
  • I haven't worked on PHP, no idea what is the global.asax equivalent there. I do know there is a php.ini file to set things, but not sure whether it would be useful to you. This is the best place to research: http://php.net/docs.php – Prahlad Yeri Mar 23 '13 at 11:12