PageSpeed Insights Community Connector for Data Studio
This is not an official Google product
This community connector uses the Google PageSpeed Insights API.
Set up the Community Connector for personal use
To use this Community Connector in Data Studio there is a one-time setup to deploy your own personal instance of the connector using Apps Script.
Deploy the connector
Follow the deployment guide to deploy the Community Connector.
Using the connector in Data Studio
Once you've set up and deployed the connector, follow the Use a Community Connector guide to use the connector in Data Studio.
Authentication: API Key
The connector requires an API Key to authenticate and connect to your account. Follow the steps below to obtain a free API key from Google:
- Visit the Page Speed Insights Tutorial, click GET A KEY.
- Paste the key into the credentials box during connector authentication.
This app isn't verified
When authorizing the community connector, if you are presented with an "unverified" warning screen see This app isn't verified for details on how to proceed.
Developer examples and use cases covered in the connector
- 3rd party key based authentication This community connector requires the use of a third-party 'key' based authentication.
- error handling and messaging Example of using error handling methods and providing useful error messages to users.
- using a 3rd party api which returns the configuration as part of the data studio results The connector uses a 3rd party api to get the page speed score, and also returns the configuration which was set by the user as a custom dimension.
There are a few next steps that could improve this connector. please feel free to open a PR with any of these improvements.
- Refactor the Connector to use the new Data connector Service.
- Listing the actual opportunities that are not complied with as a separate set of dimensions to be displayed in a table.
- Better error handling when the url is not valid or if the api key expires/ goes over quota.
- Add Configuarable cacheing using Data Studio api
- Breaking out mobile and desktop score into separate metrics
- Adding the count of the number of opportunities to improve the url
- Added a direct link to the actual report on the web
If you have any feedback, feel free to tweet at @ukdatageek (the original author of this connector), or open an issue in the repo.
- Fork this project and make your changes.
- Make sure you run
prettier --write "**/*.js"on your code before you push to make your code look great and easy to read.
- Raise an issue in github and describe what you are going to fix
- Push your changes to branch with the issue name in it eg 145/update-api-to-v5
- Create a pull request with details of the change