Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Page Counter

  1. #1
    Regular Coder LearningCoder's Avatar
    Join Date
    Jan 2011
    Location
    The Pleiades
    Posts
    912
    Thanks
    76
    Thanked 28 Times in 28 Posts

    Page Counter

    Just wanted to know what the correct procedure is for counting page views with a site.

    If a user visited the homepage first and then the contact us page for example, do you cound that as 1 viewing or 2 viewings?

    Also, do I need to retrieve information about a user using the $_SERVER global to determine if it is the same user viewing the separate pages?

    Regards,

    Lc.
    Last edited by LearningCoder; 10-29-2012 at 06:27 PM.

  • #2
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,090
    Thanks
    51
    Thanked 506 Times in 493 Posts
    It's a minefield. Some forums count you looking at the same topic twice as two views while others will only count you if the number of replies has changed etc. Thats just forums..

    I don't think there is any right or wrong answer here to be honest with you LC. It's more a preference of what you prefer. Many tracking programs count hits and then 'unique' hits - so you get to see both.
    My helpful sig is on vacation trying to loose some weight. It got a bit fat and caused a few problems but it will be back at some point!

  • #3
    Regular Coder LearningCoder's Avatar
    Join Date
    Jan 2011
    Location
    The Pleiades
    Posts
    912
    Thanks
    76
    Thanked 28 Times in 28 Posts
    Ah thank you for the clarification.

    Given what you've said, I think I will increment the count when any of the pages are accessed. After all I suppose it could be classed as a 'page view' because we're viewing that new page/content so maybe it should be incremented like that.

    Not only that, it looks better for me!

    Thanks for the reply.

    Kind regards,

    LC.


  •  

    Posting Permissions

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