How to Enable the PageSpeed Insights Widget in W3 Total Cache
Last updated on

How to Enable the Google PageSpeed Insights Widget in W3 Total Cache

You can use W3 Total Cache to connect to the Google PageSpeed Insights API so that you can see your website’s speed and get suggestions to optimize your WordPress website even further using those scores directly from the Performance Dashboard. Not only will you get an overview of your website performance directly on your dashboard, but you can get a PageSpeed score for every page on your WordPress website from the Admin Toolbar at the top. Cool, right? Use the following instructions to create a Google PageSpeed Insights API Key and connect them to your W3 Total Cache WordPress performance plugin to get insight into your next steps for making your website pages load faster than ever before.

Screenshot of the Performance Dashboard with the Google Page Speed Widget Enabled

Create your Google Cloud Project

  1. Log into your Google Account and navigate to the Google Cloud Console located at https://console.cloud.google.com
  2. If this is your first Google Cloud project for your website, click on Select a Project.Screenshot fo the Google Cloud Platform interface, highlighting the Select a Project button
  3. If you already have a project set up for your website, choose that project. If you have another project set up for other reasons, it’s best practice to create a new project dedicated to this website. You will thank us for this advice later.
  4. Name your project with a name unique to this website so it is easy to understand later, and click Create.Screenshot of creating a new Google Cloud Project

Enable the PageSpeed Insights API

  1. Click on APIs and Services from the menu.
  2. Click Enable APIs and Services at the top of the screen.
  3. Start typing Pagespeed into the search bar, and when it appears from the list of APIs, click PageSpeed Insights API.A Screenshot of Enabling the PageSpeed Insights API
  4. Click on Enable on the next screen.

Create Your PageSpeed Insights API Key

  1. After enabling the API, you’ll be brought to the PageSpeed Insights Overview screen. Click on Create Credentials near the top.A screenshot of the Create Credentials button from the PageSpeed Insights Overview
  2. Look for the option to skip this stem and create an API key.A screenshot highlighting the link to skip this option and create an API key
  3. Optionally create a name for your API Key, and under Application Restrictions choose HTTP referrers.
  4. Enter your domain into the field, using wildcards and the appropriate http/https protocol, e.g. https://*.example.com/*
  5. Click Create and copy your new key to your clipboard.

Enter your API Key into W3 Total Cache

  1. Navigate back to your WordPress Dashboard’s Performance -> General Settings -> Miscellaneous section.
  2. Click  Enable Google Page Speed dashboard widget and paste your API key and HTTP Referrer into the fields.A screenshot of pasting the API key into W3 Total Cache settings
  3. The PageSpeed Insights widget will now be visible on your Performance -> Dashboard screen.

Congratulations! Now you know how to connect your W3 Total Cache Dashboard Widget to Google PageSpeed Insights so that you can optimize WordPress for speed even more effectively. Next, you may want to learn how to set up W3 Total Cache debugging to troubleshoot your caching configuration or learn how to set up Caching Statistics for detailed insight if you are a W3 Total Cache Pro User.

W3 Total Cache

You haven't seen fast until you've tried PRO

   Full Site CDN + Additional Caching Options
   Advanced Caching Statistics, Purge Logs and More

Everything you need to scale your WordPress Website and improve your PageSpeed.

8 thoughts on “How to Enable the Google PageSpeed Dashboard Widget in W3 Total Cache

  1. I have a key with no restrictions (while testing) but the dashboard widget doesn’t appear to be functioning correctly. When I click “Refresh Analysis”, it says “Unable to fetch Page Speed results.”, I can see in the Chrome Dev Tools that the network response comes back with {“error”:”API call failed”}.

    Am I missing something in the config?

Leave a Reply to Jon Cancel Reply

Your email address will not be published. Required fields are marked *