# Configure Google PageSpeed Insights

> Connect Google PageSpeed Insights and run mobile or desktop website audits from AgencyTitan workflows.

URL: https://www.agencytitan.com/help/settings/google-pagespeed-insights/

Google PageSpeed Insights runs Lighthouse audits for a website and returns performance scores, Core Web Vitals, lab metrics, and the most useful audit findings in a workflow-friendly format.

## Before you begin

- Create a Google Cloud project or choose an existing one.
- Enable the **PageSpeed Insights API** for that project.
- Create an API key in **Google Cloud Console**. Restrict the key to the PageSpeed Insights API and add application restrictions that match the way your team sends requests.
- Check the project's PageSpeed quota before running large batches of audits. Each audit consumes provider quota, so avoid unnecessary fan-out and repeated tests.

## Connect the integration

1. Open **Settings**, then **Integrations** ([/settings/integrations/apps](https://app.agencytitan.com/settings/integrations/apps)).
2. Open **Google PageSpeed Insights**.
3. Select **Connect** and enter the Google API key.
4. Give the connection a recognizable name, select **Verify**, and save it after verification succeeds.

The integration uses API-key authentication. AgencyTitan sends the key in the request query parameter required by Google PageSpeed Insights, not as a bearer authorization header. Credentials are stored by the integration connection and are not included in workflow results.

PageSpeed connections support both tenant and client scopes. Use a tenant connection for shared agency access. Use a client connection when that client should use its own Google Cloud project or quota. Client connections are managed from the client's Integrations area ([/clients/:id/integrations](https://app.agencytitan.com/clients/:id/integrations)).

## Configure a PageSpeed action

In the workflow builder, add the PageSpeed endpoint from the **Integrations** actions and configure these fields:

| Field | What it does |
| --- | --- |
| **Website URL** | Audits the supplied HTTP or HTTPS URL. The field is optional when the action runs with a client context that has a valid Website value. |
| **Strategy** | Choose **Mobile** or **Desktop** for the Lighthouse analysis. |
| **Categories** | Choose **Full audit**, **Performance**, **Accessibility**, **Best Practices**, or **SEO**. |
| **Locale** | Optionally sets the locale used for formatted Lighthouse text, such as `en-US`. |

When **Website URL** is blank in client context, AgencyTitan reads the current client's **Website** field. An explicit URL always takes precedence. If neither value is a valid HTTP or HTTPS URL, the action stops with a validation error.

The full audit sends all four supported categories: **Performance**, **Accessibility**, **Best Practices**, and **SEO**. These are the current choices for this integration; legacy Lighthouse categories such as **PWA** are not supported.

The same connected endpoint can be executed by supported MCP and workflow actions. In either case, AgencyTitan applies the selected connection, URL fallback, category transform, and normalized response behavior described here.

## Understand the result

AgencyTitan trims the provider response to fields useful in a workflow. The result includes:

- **requested_url**, **final_url**, **analysis_utc_timestamp**, **fetch_time**, and **lighthouse_version**.
- **scores** for **performance**, **accessibility**, **best_practices**, and **seo**, expressed as values from 0 to 100 when Google provides a score.
- **core_web_vitals**, including the overall category, LCP, CLS, INP, FCP, and TTFB values. Values are selected from URL-level field data when available, otherwise origin-level data. The `source` field identifies `url`, `origin`, or `none`.
- **lab_metrics** for FCP, LCP, CLS, Speed Index, Total Blocking Time, and Time to Interactive.
- Up to 10 **audits** with an audit ID, title, score, display value, description, numeric value and unit, and estimated time or byte savings when available.

The returned audit list is pruned to actionable findings. Informational, manual, not-applicable, and high-scoring audit entries are omitted, so an empty list does not mean that the provider request failed.

## Troubleshooting

| Symptom | Likely cause | What to do |
| --- | --- | --- |
| The connection cannot be verified | The API is disabled, the key is invalid, or the key restriction does not allow the PageSpeed Insights API | Enable the API, check the key, and review both API and application restrictions in Google Cloud Console |
| The action says a Website URL is required | No explicit URL was provided and the current client has no valid Website value | Add a valid Website value to the client or provide the URL in the action |
| Audits are rejected or throttled | The Google Cloud project has reached its PageSpeed quota | Check the project's quota and reduce repeated or parallel audits |
| A client audit uses the wrong quota or credentials | The workflow is using a tenant connection instead of a client connection | Configure and select the appropriate client-scoped connection |

## Related articles

- [Integration account mappings and reference fields](https://www.agencytitan.com/help/settings/integration-mapping-references/): Choose which connected external account a client or task should use.
- [Add actions and steps](https://www.agencytitan.com/help/automations/add-actions-and-steps/): Add and configure actions, connect nodes in execution order, and use control-flow and utility steps in the automation builder.
- [View automation run history](https://www.agencytitan.com/help/automations/view-run-history/): Use the Activity tab to filter automation runs, open an execution timeline, inspect step errors, copy identifiers, and re-run safely.
