Posts

Showing posts from December, 2017

How to Use Pagespeed Insights API with Angular 5

Quick and Easy Angular 5 PageSpeed Service Pagespeed Insights is a Google product that allows you to analyze a site for common hiccups that can cause a poor user experience. You can check it out at  Google PageSpeed Insights . One of the problems with this is if you wanted to put it on your own site you would have to link back to Google, causing traffic to leave your site which you may never get back. Luckily, Google offers a simple to use REST API that we can use to get the data and format it on our own sites. This way, you can show visitors to your site problems with their site while keeping your own site theme, your own branding, and without having to redirect traffic. While  Google already has a tutorial , it is written for regular Javascript. In this tutorial, I will show you how to setup the PageSpeed Insights API from within Angular 5. This will allow for a full component that can be placed anywhere on your site. We will make sure our data is in Observables as well to take