With User Timings, you can track and visualize user defined custom timings about websites. The report shows the execution speed or load time of any discrete hit, event, or user interaction that you want to track. This can include measuring how quickly specific images and/or resources load, how long it takes for your site to respond to specific button clicks, timings for AJAX actions before and after onLoad event, etc. User timings will not alter your pageview count, hence, makes it the preferred method for tracking a variety of timings for actions in your site.
To collect User Timings data, you'll need to add JavaScript timing code to the interactions you want to track using the new _trackTiming API included in ga.js (version 5.2.6+) for reporting custom timings. This API allows you to track timings of visitor actions that don't correspond directly to pageviews (like Event Tracking). User timings are defined using a set of Categories, Variables, and optional Labels for better organization. You can create various categories and track several timings for each of these categories. Please refer to the developers guide for more details about the _trackTiming API.
Here are some sample use cases for User Timings
- To track timings for AJAX actions before and after onLoad event.
- A site can have their own definition of “User Perceived Load Time”, which can be recorded and tracked with user timings. As an example, news websites can record time for showing the above fold content as their main metric instead of onLoad time.
- Detailed performance measurement and optimization of sub components on a page, such as time to load all images, CSS or Javascript, download PDF files and time it takes to upload a file.
Go to the content section and click the User Timings report under Content section. There are three tabs within the User Timings report for you to review: Explorer, Performance, & Map Overlay. Each provides a slightly different view of user timings reported.
The Explorer tab on the User Timings report shows the following metrics by Timing Category, Timing Variable, or Timing Label (all of which you define in your timing code).
- Avg. User Timing—the average amount of time (in seconds) it takes for the timed code to execute
- User Timing Sample—the number of samples taken
To learn more about which timings are most common for user timings, switch to the Performance tab. This tab shows timing buckets, providing you with more insight into how speed can vary for user reported timings for selected category, variable and label combinations. You may switch to Performance tab at any point of navigation in the Explorer tab, such as after drilling down on a specific category and variable, to visualize distribution of user reported timings. The bucket boundaries for histograms in Performance Tab are chosen to be flexible so that users can analyze data at low values ranging from 10 milliseconds granularity to 1 minute granularity with addition of sub-bucketing for further analysis.
- Satish Kambala & Mustafa M. Tikir, Google Analytics team
Post a Comment