SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Logging page render times?

    Hey everyone,

    I am looking for a javascript function that can log the following information for each pageview:

    1. The total page rendering time (not php script execution time, but the time at which the entire page is rendered from the user's perspective - all images loaded, ads served etc)

    2. The URL of the page

    3. The browser used to access the page

    4. The country the page was accessed from

    The script should then store the information in a database via an AJAX call after it's been collected.

    It sounds like a tall order, but it will help me get a picture of how fast or slow my site feels depending on where you live (e.g. how far you are from the server), what browser you're using, and which pages are the slowest to render (keep in mind this is not script execution time or query time, but literally the time at which the page starts to render, to when it finishes rendering).

    Is that possible?

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    If you sign up with Google Analytics, they will track all of that for you and more.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've been using GA for years and I've never seen anything that records rendering time. Am I missing some hidden feature?

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by AgmLauncher View Post
    I've been using GA for years and I've never seen anything that records rendering time. Am I missing some hidden feature?
    Yes indeed. Here's a good article on tracking web page load times
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  5. #5
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've looked at that, but it seems like an awkward way of displaying & organizing that data. It would be so much easier if it was a standard GA metric that showed up whenever you viewed content.

    Will it work with custom reporting so I can view average value against browser type, visitor type, and country?

  6. #6
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by AgmLauncher View Post
    I've looked at that, but it seems like an awkward way of displaying & organizing that data. It would be so much easier if it was a standard GA metric that showed up whenever you viewed content.

    Will it work with custom reporting so I can view average value against browser type, visitor type, and country?
    That I have no direct experience with, but others might have something else to add here.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

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