Google PageSpeed Insights

Google PageSpeed Insights

GitList Repository ViewerThe Google PageSpeed Insights API is a valuable tool for web developers looking to optimize performance. You can access the Google PageSpeed Insights API from this web page but if you want to take it a step further, you can install the PageSpeed Insights Node module and have this tool readily available at all times right from your terminal.

First if you don’t already have Node.js or NPM installed on your system be sure to complete those installations before proceeding with these instructions. For Mac users, you just need to have XCode and Homebrew then you can brew install node and both Node and NPM will be installed on your system. Linux users can use their native package manager (yum, apt-get, pacman) and Windows users can download the installer here or use the Windows package manager Chocolatey.

Now that you have both Node and NPM installed on your system we can proceed with setting up the PageSpeed Insights Node module that will provide you the ability to quickly run pagespeed reports from your Terminal. To install the PageSpeed Insights Node module enter the following command and press enter:

npm install --global psi

Once the installation is complete, you can type: psi to perform a pagespeed insights report on Below is a screenshot of what the pagespeed insights reports look like from your terminal:

Google PageSpeed Insights Node Module
This is a great tool for developers and the goal is to make sure your pagespeed scores are always 70 or higher. Google has publicly disclosed that pagespeed has been a ranking factor since 2010 so it’s important to keep speed in mind.

Please feel free to leave your comments, feedback or suggestions below and we will follow-up soon with a post about improving your pagespeed scores.