Do you need to track page speed of your website, or of several landing pages? Would you like to get email alerts if a page is too slow. Let’s do that with dashdash!
The app looks like this:
We are using the Google Pagespeed Insights API for this. You will need a Google API key. There are alternative services like pingdom that you can use. Once you have an API key, go ahead and activate the Google Pagespeed integration in our Integrations menu.
We will do the following steps:
- Set up automation
- Send requests
- Parse score
- Insert into log
1. Set up automation
B1: 0 or 1 - this is just a manual switch
=IF(C1=1,REPEAT(TODAY(),1440),"-- stopped --")
So if you set the switch in C1 to 1, you will have TODAY’s date repeated daily.
2. Send requests
A5: [the URL you want to track] - note that the API requires to send http(s)://…
We send two different requests here. As you can see, we add the strategy “mobile” in C5, while the request in B5 uses the default strategy for “desktop”.
3. Parse score
Now we grab the pagespeed score for both desktop and mobile. Note that there are many other metrics you can parse from the JSONs in columns B and C. Check for example the “pageStats” offered in the documentation.
4. Insert into log
=IF(F5<>FALSE,INSERT(A$4:F$4,A5:F5,'Log'!A$1:D$1),"-- stopped --")
Now we add a time stamp. And we insert the data into a separate Log view so we can analyze it later.
If you don’t want to use our integration for the requests, you can use our GET function as an alternative. It works like this, assuming you store your API key in G1: