What do your two page fields look like? What sort of format are time and sample in?
1 of 1 people found this helpful
Time really isn't a Measure, so first you'll need to make it a dimension. And you'll also need to change the data type from number to date/time. I'm also not really sure your basic calculation can be done using the fields you have chosen. Google defines these two as:
- Page Load Sample: The number of pageviews that were sampled to calculate the average page-load time.
- 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.
- Page-load time for a sample of pageviews on your site. You can view the data across different dimensions to see how quickly your pages loaded from a variety of perspectives (e.g., in different browsers, in different countries). No additional configuration is required to see this data. Data is available in the Overview and Page Timings reports.
So I'm not sure you can divide Page Load Time or Avg Page Load Time by Sample size and get the same number Google is calculating for speed. (?) But if you want help setting it up, post a packaged workbook with a bit of sample data and I'll give you a hand.
Hey I figured it out- it works fine the way I had it I just needed to change the measure values aggregation from SUM to AVG-- thanks for your help though!
Your current formula will be accurate if you just look at the "Page" field from GA. However if you aggregate single "Pages" into groups, say sections then you will not have an accurate number. You will get an average of averages as you change aggregations in your dimensions.
You might want to modify your calculation to render a weighted average that will be accurate for all roll ups of your data.
Here's what I use.
( Sum([Page Load Time])/ Sum ([Page Load Sample]) ) * .001
// Source: developers.google.com/analytics/devguides/reporting/core/dimsmets/sitespeed#ga:pageLoadTime
Now the next thing I'm trying to figure out is why I can't get this formula to work using Pageviews instead of the field Page Load Sample, which is the count of pageviews GA used to calculate the average page load time.
Thanks Bruce, That seems to be the correct answer!