Paste Search Dynamic
Recent pastes
getPageSpeedData
  1. function getPageSpeedData (url) {
  2.   var url = url;
  3.   var pageSpeedApi = "https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=" + url + "&strategy=desktop&key=AIzaSyC62fdejPrYL5CKmoVO3rL_ARWMk505f&prettyPrint=true";
  4.   var source = UrlFetchApp.fetch(pageSpeedApi, {muteHttpExceptions: true}).getContentText();
  5.   var data = JSON.parse(source);
  6.   var metrics = data.loadingExperience.metrics;
  7.   var lighthouse = data.lighthouseResult.audits;
  8.   var categories = data.lighthouseResult.categories;
Parsed in 0.006 seconds