free strategy session

[Tool] PageSpeed Insights API and Instructions

Date published: September 16, 2013
Last updated: September 16, 2013

So, you've discovered the value in Google's PageSpeed Insights Tool. You've analyzed a page on your website to discover some of the performance issues that are keeping your site from reaching its true potential. Now, you want to see how you can use the PageSpeed Insights tool to get a better understanding of your entire site's performance issues.

Fortunately for all of us, Google released access to the PageSpeed Insights API. This opened up the opportunity to create a tool. Now we (or any user) can input any number of URLs and analyze each one to see common recurring issues throughout a site.

Before using the tool:

Learn how to unlock any Google Drive tool here. Get a copy of the PageSpeed tool here. You'll also need to enable the Google PageSpeed Insights API from your Google API Console.

Once you've enabled the PageSpeed Insights API, navigate to API Access >> Create new Browser key... in Google's API Console and use the new browser key that's generated when prompted in our tool after clicking any one of the first, second, or third options from the PageSpeed Menu.

Here's how we use it:

1) Get a list of high-performing site URLs.
2) Drop them into column A.
3) Click Page Speed Menu >> Pull Page Speed API.

4) Input the Google API Console browser key (mentioned above) and let the tool run.

If the tool stops running:

The tool can stop running for one of two reasons: the Google PageSpeed Insights API has a problem with the URL submitted and returns an error, or the script reaches its execution time limit. Google limits the length that a script (or tool) can execute in Google Drive. Depending on the number of URLs you have entered into column A, the script may time out. If the script times out or the API returns an error and you have a valid URL in the row the tool errors out on, simply click Page Speed Menu >> Continue Pulling Page Speed API (Script Execution Time Limit or API Error) from the drop-down menu. The script will pick up where it left off.

If the tool skips a row:

If the tool times out, it may pick up on the following row from where it left off. This will leave the row it timed out on as blank and will mean that one of the cells in the time out row contains "Thinking...". To fill in that row (and additional rows that have the same issue), click Page Speed Menu >> Retry "Thinking..." Rows.

Updating row colors:

Updating row colors happens automatically after the script runs by choosing the first, second or third option. But if the script times out and you want to see the final highlighted results before letting the script continue or pick up where it left off, you can click Page Spec Menu >> Update Row Colors, and the spreadsheet will highlight each row from light green to green to yellow to red. The way the highlights are calculated is by taking a look at the highest value in the row and dividing it by three. From there you have high (red), medium (yellow), and low (green) breakdowns of your scores.

Reading the results:

Google gives a relative impact score of each item compared to other items on the page. A higher impact score means it is a bigger problem. The higher scores are highlighted in red. Ultimately, the point of this analysis is to see patterns of page speed issues in the pages you've selected. Most of the time, the result will highlight a large portion of a column(s) red or yellow showing you that you could gain a site-wide performance boost by correcting that one issue.

Speeding up your site:

If you want the same analysis on one page with suggestions on how to correct the issues, click the link created in the PageSpeed URL column (see below):

If you click the link, you are taken right to the PageSpeed Insights Tool where Google runs the same analysis:

Once their analysis is complete, they display the site issues:

Click on any one issue to see instructions for correcting the issue on your server:

Your PageSpeed score goal:

We believe that page speed serves as a quality indicator to Google and your site visitors. Improving page speed will improve on-page metrics. Because of this, we recommend setting your goal for page speed score for any one page to be above 90. Doing this will set you apart from your competitors. Google will notice; but most importantly, your site visitors will notice. They'll thank you by staying for this visit--but once they're there, it's up to you and your content to keep them.

Privacy PolicyCookie Policy
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram