11 Replies Latest reply on Apr 16, 2007 1:28 PM by slegendre

    Traffic Report

      I’m brainstorming some ideas how to allow users of my website see their individual web statistics. How many times their profile has been clicked, what key words were used to search for them, how many times a URL within their profile was clicked and other report statistical data.

      Can anyone point me in the right direction?

        • 1. Re: Traffic Report
          jdeline Level 1
          Some of this information is in the Web logs. There are a number of packages that can process Web logs and extract this kind of information. Google web log statistics.
          • 2. Re: Traffic Report
            slegendre Level 1
            Thanks for the reply.
            Do you mean Google Analytics? I'm using both Google Analytics and AWStats to view my traffic data, but i'm looking for a way for clients to view only their data. Are you saying I can grab the info in code from Google Analytics and display it how I want?
            • 3. Re: Traffic Report
              jdeline Level 1
              No, I mean go to www.google.com and search for web log statistics.
              • 4. Re: Traffic Report
                slegendre Level 1
                Jdeline, thanks for your help, but this search is really getting me nowhere. Maybe you can give me a link to an example of what you’re talking about? Remember I am already using AWStats and Google Analytics (which is what most of the searches in Google for “web log statistics” brings up).

                Just incase there has been a misunderstanding, I’m looking to allow each client view their own web statistics, based on only their own profile. I was assuming I could do this in code somehow.

                • 5. Re: Traffic Report
                  It sounds like you need to create a log of your own to register activity. You seem to be talking about some kind of social network site, so when a profile is viewed you'd want to record who viewed it and when. You can then match these to reports for each user. Same thing with searching - track the key words searched that leads to a view.

                  It shouldn't be too difficult to add a few lines of code to your programs to log this activity - the only concern would be how fast the log file grows.
                  • 6. Re: Traffic Report
                    slegendre Level 1

                    Yeah, I think thats what i'll need to do. Can you provide any help on where to begin? How can I capture who viewed and when? I’ll probably only show the user the number of views, opposed to detailed info. At least I can start there and work my way into more detailed reports.

                    So how, in code, is tracking and recording done? I’m sure if I can figure out how to track how many times a URL has been clicked on, the rest I can figure out with some given time.

                    • 7. Traffic Report
                      dempster Level 1
                      That's a very broad question - it depends on how you have your system set up. If your users are logged in, I assume you have some sort of session variable to identify them. If they click on a link to view a profile, you would have their identity, the number of the profile they viewed, the time, and some environmental variables (IP, browser), all of which you could write to a database record.
                      • 8. Re: Traffic Report
                        slegendre Level 1
                        Yes I do have a session variable to identify users logged in, but in some cases browsers will not be logged in, but I could probably grab the enviornmental variables (IP, browers) like you said.

                        So lets say I have a "member" with a profile and a browser clicks the members profile. Got any mock examples how this would look in code?
                        • 9. Re: Traffic Report
                          jdeline Level 1
                          Let's assume your member profile list contains something like that shown below. When Sam Jones is clicked, getProfile.cfm is called and the code below is processed. You can make the tblLog as intricate as your imagination allows.
                          • 10. Re: Traffic Report
                            dempster Level 1
                            I'd suggest using a date/time value to record that in the log instead of formatted strings:

                            CFSET logdate = CreateODBCDateTime(Now ())
                            • 11. Re: Traffic Report
                              slegendre Level 1
                              I'll play around with this for a while and see where I get. Thank you both for your help thus far, its been really helpfull. I'll post with the results throughout the week.