Created
August 26, 2020 03:51
-
-
Save arijitMondal/219084169ab0f3275c4fb97c02a085f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getPageSpeedInfo(strategy) { | |
var pageSpeedUrl = 'https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=' + urlToMonitor + '&key=' + pageSpeedApiKey + '&strategy=' + strategy; | |
var response = UrlFetchApp.fetch(pageSpeedUrl); | |
var json = response.getContentText(); | |
return JSON.parse(json); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment