+ Reply to Thread
Results 1 to 5 of 5

Thread: PHP Web Analytics Script

  1. #1
    Newbie adzeds is an unknown quantity at this point
    Join Date
    Oct 2009
    Location
    Bristol, UK
    Posts
    27

    PHP Web Analytics Script

    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!

  2. #2
    Moderator Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan's Avatar
    Join Date
    Dec 2006
    Location
    Estonia
    Age
    18
    Posts
    2,075
    Blog Entries
    9

    Re: PHP Web Analytics Script

    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 :/
    Get A Cheap Top Level Domain, COM and NET domains only for $7.95 - Get Yours Now!
    Trill Hosting - Cheap SSL, Cheap Web Hosting, Register Cheap Domains, Cheap Blog Hosting
    www.trillhosting.com | support@trillhosting.com
    Hosting Plans | Write To Us | Support | Client Area | About Us

    CodeCall Blog | CodeCall Wiki

  3. #3
    Newbie adzeds is an unknown quantity at this point
    Join Date
    Oct 2009
    Location
    Bristol, UK
    Posts
    27

    Re: PHP Web Analytics Script

    Thanks for the advice!

    Just need to work out how to calculate time on site!

  4. #4
    Code Warrior BlaineSch is a glorious beacon of light BlaineSch is a glorious beacon of light BlaineSch is a glorious beacon of light BlaineSch is a glorious beacon of light BlaineSch is a glorious beacon of light BlaineSch is a glorious beacon of light BlaineSch's Avatar
    Join Date
    Apr 2009
    Location
    Trapped in my own little world.
    Age
    20
    Posts
    2,223
    Blog Entries
    8

    Re: PHP Web Analytics Script

    Time on site youd calculate by one page to another.

    User1, page1, 1:00
    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. #5
    Moderator Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan's Avatar
    Join Date
    Dec 2006
    Location
    Estonia
    Age
    18
    Posts
    2,075
    Blog Entries
    9

    Re: PHP Web Analytics Script

    I believe you can do something with sessions.. hmm
    Get A Cheap Top Level Domain, COM and NET domains only for $7.95 - Get Yours Now!
    Trill Hosting - Cheap SSL, Cheap Web Hosting, Register Cheap Domains, Cheap Blog Hosting
    www.trillhosting.com | support@trillhosting.com
    Hosting Plans | Write To Us | Support | Client Area | About Us

    CodeCall Blog | CodeCall Wiki

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. PHP: New Calculator script
    By Brandon W in forum Classes and Code Snippets
    Replies: 28
    Last Post: 10-08-2008, 03:15 PM
  2. how update an old php script
    By midnightrose2008 in forum PHP Forum
    Replies: 1
    Last Post: 07-07-2008, 09:39 PM

Bookmarks

Bookmarks

     
        Algorithms and Data Structures

        Java tutorials

        Algorithms Forum

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts