Reputation: 2837
Google's documentation is a little unclear to me, and I can't find anything more explicit in terms of Google Analytics' DOM Timings:
https://support.google.com/analytics/answer/2383341?hl=en
Avg. Document Interactive Time: The average time (in seconds) that the browser takes to parse the document (DOMInteractive), including the network time from the user's location to your server. At this time, the user can interact with the Document Object Model even though it is not fully loaded.
Avg. Document Content Loaded Time: The average time (in seconds) that the browser takes to parse the document and execute deferred and parser-inserted scripts (DOMContentLoaded), including the network time from the user's location to your server. Parsing of the document is finished, the Document Object Model is ready, but referenced style sheets, images, and subframes may not be finished loading. This event is often the starting point for javascript framework execution, e.g., JQuery's onready() callback, etc.
Avg Page Load Time: The average amount of time (in seconds) it takes that page to load, from initiation of the pageview (e.g., click on a page link) to load completion in the browser.
My Questions are:
1) Does the Avg. Page Load Time correspond with the $(window).load() event?
2) Does the Avg. Document Content Loaded Time correspond with the $(document).ready() event?
3) What event, if any, does the Avg. Document Interactive Time correspond with?
Upvotes: 2
Views: 1145
Reputation: 150
1) Yes. (But $(window).load() has been deprecated in jQuery, use $("selector").on("load", function() {});) instead.
2) Yes. (They both refer to the same readyStade property of the Document object)
3) The "Avg. Document Interactive Time" corresponds to the readyState property of the document object. There is no corresponding event in jQuery for this but it refers to the time when the user can interact with the DOM.
Upvotes: 3