Using Google's PageSpeed Insights API, I would like to create a button, that when pressed, fills out the following fields:
[Speed]
[User Experience]
[Should Fix]
Based on the URL in the field [Website] on the record.
How can I accomplish this?
- 0 Points
Posted 3 years ago
Ⲇanom the ultimate (Dan Diebolt), Champion
-
29,604 Points
I tried this code:
var url= "https://www.googleapis.com/pagespeedonline/v1/runPagespeed";But I get an error:
$.ajax(url, {
dataType: 'jsonp',
data: {
url: "https://quickbase.com",
key: "AIzaSyD23MrZsN9vxr1GtZ1qQ40AtYfSIQ5qy3s"
}
}).then(function(response) {
console.dir(response);
});
"Access Not Configured. The API (PageSpeed Insights API) is not enabled for your project. Please use the Google Developers Console to update your configuration."I think the problem is that I can't prove I own the domain haversineconsulting.quickbase.com to Google (because I don't own the domain). I think you are going to have to run this through a proxy for which you can verifyyou own the domain through Google and then pump the results to QuickBase.
Ⲇanom the ultimate (Dan Diebolt), Champion
-
29,604 Points
But then I removed my key and got this response
https://paste.ee/p/yiLin
So maybe you can call the service without a key if you operate under some threshold.
If you want to pursue this contact me offline. It might be very easy to do.
https://paste.ee/p/yiLin
So maybe you can call the service without a key if you operate under some threshold.
If you want to pursue this contact me offline. It might be very easy to do.
Ⲇanom the ultimate (Dan Diebolt), Champion
-
29,604 Points
Google PageSpeed Insights
https://haversineconsulting.quickbase.com/db/bkjw64g5e?a=nwr
Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=472
Notes
(1) I am not using an authentication key when making the service call to Google but it appears to work. I don't know what limitations Google places on using their service this way but I am sure at some level of activity you will need to use a key and have to confirm ownership of the domain (which you can't do from QuickBase so you would have to use your own proxy).
(2) In the example you have to enter a URL with http(s) included and blur the record. After the response populates you can save the record.
(3) I am storing the raw JSON response in the field [Response]. However the response is very large and I would assume you want to do some extraction or parsing of the results. This could be an extensive amount of work depending on how much information you want to extract.
(4) Feature only implemented on add new record page.
https://haversineconsulting.quickbase.com/db/bkjw64g5e?a=nwr
Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=472
Notes
(1) I am not using an authentication key when making the service call to Google but it appears to work. I don't know what limitations Google places on using their service this way but I am sure at some level of activity you will need to use a key and have to confirm ownership of the domain (which you can't do from QuickBase so you would have to use your own proxy).
(2) In the example you have to enter a URL with http(s) included and blur the record. After the response populates you can save the record.
(3) I am storing the raw JSON response in the field [Response]. However the response is very large and I would assume you want to do some extraction or parsing of the results. This could be an extensive amount of work depending on how much information you want to extract.
(4) Feature only implemented on add new record page.
- 60 Points
Guys... how to remove special character from the output of pagespeed insight http://webbatlas.com/url-insight/
The Json file got me (!@#$%^&*()\\}{[]) ---< how to remove all of this
The Json file got me (!@#$%^&*()\\}{[]) ---< how to remove all of this
Related Categories
-
APIs & custom code
- 1417 Conversations
- 51 Followers
-
Roles & permissions
- 2230 Conversations
- 21 Followers
-
Tables & fields
- 7106 Conversations
- 162 Followers