View Full Version : statistic report regarding links pressed in asp pages? MTS?IIS?
avivit
01-13-2003, 01:08 PM
NOT SURE It's an MTS matter or just IIS , and if not, do tell me what is the software to use for it,a dn where to ask.
I'd like to get a daily/weekly/monthly report regarding number of links that r pressed from my site.
Details:
1. I have 4 pages, and each page has a list of links.
I'd like to get statistics reports regarding usage of these links. I.e. - I'd like to know how many times each link is pressed (pre day, week, month) by users.
2. I would also like to know what hour/day/date each pressing took place, and also the IP number of the user.
3. I would also like to know if possible to get the info as a table that can be edited later (if copied to excel etc.), and get Graphs also.
We r using IIS (Intranet), OS IS windows NT, and DB is Microsoft Access.
I'd like the administrator to perform such reports on a daily basis (and weekly and monthly as well), and send it to us (the asp programmers).
I have no access to the live server (besdies copying files to there), so can not use the IIS/MTS myself.
Thanks very much
Morgoth
01-13-2003, 06:52 PM
Well, your situation seems a little confusing, but if you are the programmer that uploads the ASP pages with the links on it, then there is a way to store every click of the link into a database.
You can start this two ways.
One:
You can make the links use their own table in a database labled in an indexed order, or just by a simple name.
Two:
You can use just one table, but one field must have the name of the link that you choose.
Now that you have this, each link you make that you want to be recorded will not link to the direct link right away, it will go to a page using a link as follows:
http://YourDomain.com/Files/Links.asp?link=This1
("This1" = the name of the link you clicked.
Inside of Links.asp:
You will have a connection to an ACCESS database where you will add a few things into fields in your table(s), depending on what method you choose:
1) ID number, (PrimaryKey)(Autonumber)
2) IP address, (Request.ServerVariables("Remote_Addr"))(text 100 characters)
3) Date, (Not accually in the ASP code)(Date/Time)(Default Value = Now())
4) Hits, (Not Accually in the ASP code)(Number)(Long Integer)(Default Value = 1)
And also, depending on the QueryString you will take the user to the site he clicked on:
"This1" = http://ThisPlace.com
Now to get a report, you will have an ASP page that will not be released to the public eye, unless you decide it should be.
Let's Call it "LinkReport.asp"
Inside of this file you will open up a connection to the database, and inside of this file you will need to get the information that is inside of the files. I am not going to take the time to try and figure out exactly how to do this (I am busy at the moment), but I will tell you what to do so you can figure it out. You will use the sum() function to gather all the 1s that yuou added for a certain link, and that will be the total on how many people clicked on the link, you can also determan how many people from one IP address clicked on a single link.
You know what information you need to extract, and the problem you face is the code to do it now (maybe) so just reply if you have problems. Or if you have any questions with what I wrote. (I kinda did this really fast.)
whammy
01-14-2003, 12:28 AM
http://www.codingforums.com/showthread.php?s=&threadid=7502&highlight=hitcounter
A simple script I wrote using an access db which will store the referrer (if there is one) and the page, time, ip, user_agent, etc.... as for a graph, etc. to display this info, I haven't written one yet (since this was pretty much for personal use), but you're free to modify the code as you wish. :)
Morgoth
01-14-2003, 02:35 AM
Well, I was tring to push the idea on him that he should create it himself. I very much dislike using other peoples code now-a-days. I may use it as a refferance, but it really doesn't feel I am learning anything.
But just because I say that doesn't mean I don't use tutorials or books for help. And I really doubt whammy can right everything he does without looking something up, either from his own, old code, or a site, or a book, or even these forums!
Am I right, whammy?
avivit
01-14-2003, 07:14 AM
Whammy,
thanks very much.
each link from the link lists in each asp page of mine, is to an external site.
The code u suggest is checking the referrer url statistics, which is not exactly what I need, if I understand right (cd correct me if I am wrong).
I need info regarding the number of times each link (from a list of links) in one asp page, for e.g., is pressed (target is an external site).
Morgoth, thanks, I will work on it if no choice.
I like to learn and program myself usually, but this time it is very urgent, so I'l be happy to get a basic code (which is not what I expected to get here), and if not, I will make my own.
But I am pretty sure some statistics IS possible by selecting ready made reports (not programming), using MTS. At least, regarding the referrer page (number of links from it).
Or maybe I'm confusing with "Microsoft Visual Interdev"??????? Is possible there by selecting reports? (The administrator use it for some reports maybe?)
If not, I will make my own, follow your instructions. But this time, I really hope the admin can do it (without programming).
I got too many (other) things to do now.
Thanks very much both
Morgoth
01-14-2003, 01:27 PM
Honestly, what your trying to do is very basic, and if your on a time budget, I will try and pull one together for you at school today.
No matter what, I will still get graded on it ;) And it'll be A++-
I am not to sure how you need the report to be laid out, why not reply it to me, and I will add it inside of the report code.
I am not sure about already made stuff by other programs, because I don't understand it, or need to bother to use it. Any stats, I need, I make my own.
Well, to determin the number of times a link is pressed needs to have some programming involed, so I don't know if the admin can do it.
Keep repying.
avivit
01-14-2003, 04:40 PM
Ok. If u say it is simple, Few q:
1. How do I capture the link text (not url, but the text, actually site name), and will it work for Netscape as well?
2. I do NOT want to have a table with all the links (=site names) in advance, b/c the links r dynamic (added, changed, etc.)
3. I do not quite understand how, in general, this should work:
I have, say, 5000 sites (links). If each click (even for the same site), is recorded, I may have 20,000 or 100,000 or more records per day?
Is it possible to arrange it some other way? (one record for a site???)
I can not, as well, have a different table for each link as well.
So how can I make this work? It is MS-Access we r talking about !!! Looks heavy traffic to me regarding Access. Isn't it?
4. Btw - Is it possible to call different pages simultaniously?(one for statistics, and one for the site itself). If not, I know how to handle it the classic way.
That's it for now.
Thanks very much
Morgoth
01-14-2003, 05:37 PM
Oh, that's huge.
A simple thing I was thinking about wasn't near close to something like that, and if the links change all the time.
You're going to need something much larger then what I thought.
It's a big job, if you have to deal with all the links, and the site traffic.
Access isn't a very good if you have alot of people going to a site. (As I have heard.) What's your opinion on that whammy?
I'm not to sure on how I can help with somehting that large.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.