How to Integrate Google Page Speed API with W3 Total Cache Plugin

2,838

PageSpeed Insights measures the performance of a page for mobile and desktop devices. It fetches the URL twice, once with a mobile user-agent, and once with a desktop user-agent.

PageSpeed Insights checks to see if a page has applied common performance best practices and provides a score, which ranges from 0 to 100 points, and falls into one of the following three categories:

  • Good: The page applies most performance best practices and should deliver a good user experience.
  • Needs work: The page is missing some common performance optimizations that may result in slow user experience. Please investigate the recommendations below.
  • Poor: The page is not optimized and is likely to deliver a slow user experience. Please prioritize and apply the recommendations below.

check your website speed

W3TotalCache is the best plugin for wp website that uses cache optimization for improve website speed. this plugin also provides google page speed widget in its dashboard. that show the website speed and analysis result that is helpful for checking website speed.

for use this feature the google page speed API required that is integrated with the domain name to get this API there are some easy steps.take a look towards:-

#1 Open W3TC Dashboard and go to page speed widget

open W#Tc dashboard and go to page speed widget. click on the configure or general setting or go to API_console.

integrate google pagespeed API with W3 total cache plugin

At API_console there is a dashboard like this.

integrate google page speed API with W3 Total Cache plugin

2. Create Project

First using an API create a project.

integrate google page speed API with W3 Total Cache plugin

3. Enable API

Enable API and select and search for Page Speed API.

integrate google page speed API with W3 Total Cache plugin

Select Page Speed API and Enable this.

integrate google page speed API with W3 Total Cache plugin

4. Creat Credentials

After enable create a credential for the API key.

How to Integrate Google Page Speed API with W3 Total Cache Plugin

it will provide you an API.

integrate google page speed API with W3 Total Cache plugin

Well Done!

But for using this API, domain verification is required and also OAuth consent screen feature.

5. OAuth Consent Screen

Click on OAuth Consent Screen and fill all the required details in the given form.

integrate google page speed API with W3 Total Cache plugin

6. Verify Domain

Verify domain name, it can be easily done with search console and google analytics methods.

#4. submit key and check insights

  1. copy the API key.
  2. submit this API key into W3TC miscellaneous section. and save this setting.How to Integrate Google Page Speed API with W3 Total Cache Plugin
  3. again go to the dashboard and check page speed.integrate google pagespeed API with W3 total cache plugin