Ok. Here is the deal:
I am trying to capture my website statistics using a PHP script so that I can access the mySQL database using a desktop app to analyze the stats!
I am creating my PHP script now to record the data.
I know how to collect:
access_time
ip address
referrer
search engine domain
search engine query
page accessed
How do I collect?:
avg time on site
avg pages per visit
traffic type (referral,search engine,direct)
I am including a PHP script into a site to collect the data.
Hope someone can help!
PHP Web Analytics Script
Started by adzeds, Oct 24 2009 06:54 AM
4 replies to this topic
#1
Posted 24 October 2009 - 06:54 AM
|
|
|
#2
Guest_Jaan_*
Posted 24 October 2009 - 08:54 AM
Guest_Jaan_*
hm.. you can get a traffic type like..
If referral is "google", "bing" or whatever.. then traffic type is "search engine".
if referral is not search engine then it's just "referral"
if there is no referral then it's direct..
I believe it goes like this.. but um.. average times I don't know :/
If referral is "google", "bing" or whatever.. then traffic type is "search engine".
if referral is not search engine then it's just "referral"
if there is no referral then it's direct..
I believe it goes like this.. but um.. average times I don't know :/
#3
Posted 24 October 2009 - 09:24 AM
Thanks for the advice!
Just need to work out how to calculate time on site!
Just need to work out how to calculate time on site!
#4
Posted 24 October 2009 - 01:46 PM
Time on site youd calculate by one page to another.
The first two would be one visit since the time between pages is 2 minutes, but the last is it's own visit since it's hours away. I'd make the max time like 5-10 minutes.
Quote
User1, page1, 1:00
User1, page2, 1:02
User1, page3, 4:06
User1, page2, 1:02
User1, page3, 4:06
The first two would be one visit since the time between pages is 2 minutes, but the last is it's own visit since it's hours away. I'd make the max time like 5-10 minutes.
#5
Guest_Jaan_*
Posted 25 October 2009 - 03:42 AM
Guest_Jaan_*
I believe you can do something with sessions.. hmm


Sign In
Create Account


Back to top










