It’s crucial to check page load speed since it is not only a key parameter that impacts the user experience with your website but is also one of the most important determinants of your rankings. Google armed webmasters and SEOs with the PageSpeed Insights tool that checks page load speed and evaluates the website performance on both mobile and desktop devices as well as recommends the set of improvements for any given page to help it load faster.

By all means, it’s a great tool. However, if you need to constantly monitor the performance of your pages to see the impact of the changes that either you or search engines have recently implemented, your page speed checks should be ongoing. This is where the inconvenience of manually pasting one link at a time begins to show. If you need to check a few dozens of links of a certain domain, it is a pretty time-consuming process especially if you have more than one website on your hands.

At Webxloo, we put a lot of effort into automating repetitive jobs of any kind that’s why we have created a bulk page speed checker script that utilizes Google’s PageSpeed Insights API.

The purpose of this article is to educate you on how to set everything up, run the script and automate the ongoing page speed checks to save you valuable time. Follow the steps below and don’t hesitate to contact us in case of any questions along the way.

1. Go to API Console.

2. Create a new project:

Tutorial for Bulk PageSpeed Check with Unique Script Inside Tutorial for Bulk PageSpeed Check with Unique Script Inside

3. Go to ‘Library’ on the left side navigation and search for ‘PageSpeed Insights API’. Click ‘Enable’ once you’ve found it:

Tutorial for Bulk PageSpeed Check with Unique Script Inside Tutorial for Bulk PageSpeed Check with Unique Script Inside

4. Go to ‘Credentials’. Click on ‘Create Credentials’ and then select ‘API Key’:

Tutorial for Bulk PageSpeed Check with Unique Script Inside

5. Go to Google Sheets within your Google account and create a new spreadsheet, name it accordingly. For example, Daily Bulk Page Speed Check. Go to ‘Tools’ and click on a ‘Script editor’:

Tutorial for Bulk PageSpeed Check with Unique Script Inside

6. You will be taken to a new tab. Delete the default text:

Tutorial for Bulk PageSpeed Check with Unique Script Inside

7. Paste the whole script into the tab:

Click Here For Script
Tutorial for Bulk PageSpeed Check with Unique Script Inside

8. Now you need to insert your API Key instead of the default values. To do that, go back to API Console, click on ‘Credentials’ and copy your own API Key using a Copy File icon:

Tutorial for Bulk PageSpeed Check with Unique Script Inside

9. Go back to the script editor and paste the API Key that you’ve just copied instead of ‘YOUR KEY’ values:

Tutorial for Bulk PageSpeed Check with Unique Script Inside

To specify the email address where you would like to get any error messages to, replace ‘YOUR MAIL’ with a valid email address:

Tutorial for Bulk PageSpeed Check with Unique Script Inside Tutorial for Bulk PageSpeed Check with Unique Script Inside

10. Save the script via the File tab or simply by clicking on a Floppy Disk icon.

11. Go back to the spreadsheet from #5 and refresh the page. You will see that a new ‘Page Speed’ tab has been added to the menu bar:

Tutorial for Bulk PageSpeed Check with Unique Script Inside

12. Add a new sheet and name it ‘Config’. Copy the links* you want to check and past them to this sheet:

Tutorial for Bulk PageSpeed Check with Unique Script Inside

As an example, we will check four of our links. Please note that you need to leave the first row empty for a table header.

*Note: The maximum time allowed for script execution is 6 minutes. The number of URLs that can be checked during this time ranges from 7 to 10. If you need to check more than 10 URLs at a time, you should amend the script a bit:

  • add a new row as it’s shown on a screenshot:

.addItem('Run1', 'run1')

Tutorial for Bulk PageSpeed Check with Unique Script Inside
    add one more run function and name it Run1:

function run1() {
var url = [];
url = read('A2','A37'); //change data range (URLs on sheet Config)
GetPageSpeed(url,0,4); // change second and third parameters with row numbers of URLs (from to)
}

Tutorial for Bulk PageSpeed Check with Unique Script Inside

13. Before proceeding to run a script, specify the row numbers of URLs you want to check. For our four links, since the blank row is zero row, the numbering starts at 0 and ends at 4:

Tutorial for Bulk PageSpeed Check with Unique Script Inside

14. Now we are all set to run the script and get the fruits of our labors. Go to your Google sheet, click on a Page Speed tab and click ‘Run’, then click ‘Continue’:

Tutorial for Bulk PageSpeed Check with Unique Script Inside

Click ‘Advanced’:

Tutorial for Bulk PageSpeed Check with Unique Script Inside

Click ‘Go to Daily Bulk Page Speed Check’ (or whatever your Google spreadsheet with URLs is named):

Tutorial for Bulk PageSpeed Check with Unique Script Inside

Click Allow. You will be then taken to the spreadsheet and see the ‘Running script’ notification.

Tutorial for Bulk PageSpeed Check with Unique Script Inside

15. Once the page speed check is finished, you will see the neatly displayed Page Speed scores on desktops and mobile devices along with the time needed to load your page on a 3G network in milliseconds. We have included this parameter as 3G is one of the dominant networks worldwide and a lot of users are browsing the Internet via this mobile technology:

Tutorial for Bulk PageSpeed Check with Unique Script Inside

Now you know how to check page load speed for multiple URLs at once. If any questions arise during the setup process or while running the script, do not hesitate to contact us. Stay tuned to our blog for more SEO tutorials.

Phone Consultation Phone Consultation

Free 30 minute technical consultation

Your message has been received.
An engaged representative will contact you shortly.
Thank you.
OK