Introducing Speed Demon
Have you ever worked on your website performance, cheered as improvements were made, and rejoiced as the site got faster… only to discover, a few months later, that your site speed has regressed? Maybe your site is now slower than ever!
People often use WebPageTest to test site speed. Give WebPageTest a URL, and it loads that web page on a real device and returns metrics on its speed.
Many people recommend that site owners set up an automated, regular process that calls WebPageTest weekly. After all, it’s great to work to make your site faster — but it’s sad if someone makes a change that slows your site, and you’re unaware of that. This happens frequently. Web page speed needs to be monitored regularly!
A little while ago, I made a tool called Speed Demon that does this for anyone. No programming knowledge is required. The tool runs in an Apps Script that lives inside a Google Sheet. Just make a copy of the Sheet, set a few things up, and you’re off to the races!
You give Speed Demon a set of URLs, and you list emails of people who should be notified if your page is slower than speed thresholds you set. Every week, Speed Demon polls WebPageTest and places the results into a spreadsheet tab.
Here’s where you specify your URL(s) and see results:
And here’s where you set speed thresholds and list email addresses:
1. Make your own copy of this Sheet.
2. Get an API key and configure Speed Demon to use it.
- Get an API key from WebPageTest by filling out the simple form here.
- Go to the Config tab.
- Replace the API key in cell B1 with your own.
3. Specify your URLs.
- In the “URL 1” tab, replace the URL in column B1 with the URL you want tested.
- If you want to test more URLs, copy the URL 1 tab. You can test as many as 10 URLs. Just make sure that the name of each tab starts with “URL”.
4. In the Alerting tab, enter email addresses for people who should get alerts.
5. Set up weekly tests:
- Under the “Tools” menu, select “Script Editor”. A new browser tab will open.
- In that new tab, go to the “Edit” menu and choose “Current project’s triggers”. A new tab will appear.
- In that new tab, click on “+ Add Trigger” or “create a new trigger” toward the bottom. Under “Select event source”, choose “Time-driven”. Under “Select type of time based trigger”, I recommend that you choose “Week timer”, so that this runs once per week. The dialog should look like this:
That’s it! Enjoy!
Warning about a warning
An Apps Script can now go through a verification process whereby Google ensures it’s safe. Since you’ll own this script, it won’t be verified in this way. So, when you first run it, you’ll probably see a scary warning that begins, “This app isn’t verified.”
You’ll simply have to click on the “Advanced” link in that dialog box and tell Google you trust the script.
Make it better
All things can be improved. Do you have ideas for how to make this better? Do it. Let me know or submit a PR!
1/23/19: as per requests, included in the spreadsheet, for each test, a link to show more test results in WebPageTest