# Integrating PageSpeed Insights with FlyWP

Source: https://flywp.com/docs/site/performance/page-speed-insights/

## Part 1: Generating Your Google PageSpeed Insights API Key

To enable automated performance monitoring within FlywP, you need to connect it to Google’s PageSpeed Insights (PSI) API. This requires a free API key from the Google Cloud Console.

[Video: How to Integrate PageSpeed Insights with FlyWP (Step-by-Step Guide)](https://www.youtube.com/watch?v=fdzXUd6aweQ)

Follow these steps to create and configure your key:

### 1. Set Up a Google Cloud Project

- Go to the <a href="https://console.cloud.google.com/" target="_blank" rel="noreferrer noopener">Google Cloud Console</a>.
- Log in with your Google account.
- Click the **Project Dropdown** (top left, next to the Google Cloud logo) and select **New Project**.

![Image](https://flywp.com/wp-content/uploads/2025/12/image-1-1024x598.png)

- Enter a name (e.g., `FlywP-Performance-Monitor`) and click **Create**.

### 2. Enable the PageSpeed Insights API

![Screenshot 2025 12 22 at 16.00.46](https://flywp.com/wp-content/uploads/2025/12/Screenshot-2025-12-22-at-16.00.46-1024x554.png)

1. Ensure your new project is selected in the top dropdown.
2. In the search bar at the top, type **“PageSpeed Insights API”**.
3. Click on the result under the Marketplace/APIs section.
4. Click the blue **Enable** button.

### 3. Create Your API Key

![Screenshot 2025 12 22 at 16.06.53](https://flywp.com/wp-content/uploads/2025/12/Screenshot-2025-12-22-at-16.06.53-1024x554.png)

1. Once the API is enabled, navigate to **APIs & Services &gt; Credentials** via the left-hand sidebar.
2. Click **+ Create Credentials** at the top of the page.
3. Select **API key** from the dropdown menu.
4. A dialog box will appear with your new API key.
5. **Copy this key** and store it securely.

### 4. (Recommended) Restrict Your API Key

To prevent unauthorized use of your key, it is best practice to restrict it:

1. In the “API key created” dialog, click **Edit API key** (or click the pencil icon next to the key in the Credentials list).
2. Under **API restrictions**, select **Restrict key**.
3. From the dropdown menu, find and check **PageSpeed Insights API**.
4. Click **Save**.

### Part 2: Integrate API key with FlyWP

![Screenshot 2025 12 22 at 16.04.39](https://flywp.com/wp-content/uploads/2025/12/Screenshot-2025-12-22-at-16.04.39-1024x554.png)

1. Go to integrations page and on **PageSpeed Insights** click on **Add Account**.
2. Paste your **API key** in the designated field.
3. Click **Save**.
4. Go to **Site Dashboard** and under **Performance Monitor** you will find the option to **Scan** for **PageSpeed Insights** & **Core Web Vitals**.
