Integrates Google PageSpeed Insights into the Payload admin. Creating an entry with a URL fetches a report from the PageSpeed API and saves it in a collection, showing Performance, Accessibility, SEO and Best Practices scores. Requires a PageSpeed Insights API key and Payload 3.50 or later.
A Payload CMS plugin that integrates PageSpeed Insights into your project.
Installation
npm i payload-plugin-pagespeed50
Stars
1
Forks
0
Open Issues
1 years ago
Last Updated
131
Weekly Downloads
v0.2.1
npm Version
222.0 KB
Unpacked Size
0
Dependencies
500 since Sep 7
| Date | Stars |
|---|---|
| Dec 6, 2026 | 50 |
| Dec 5, 2026 | 50 |
| Dec 4, 2026 | 50 |
| Dec 3, 2026 | 50 |
| Dec 2, 2026 | 50 |
| Dec 1, 2026 | 50 |
| Nov 30, 2026 | 50 |
| Nov 29, 2026 | 50 |
| Nov 28, 2026 | 50 |
| Nov 27, 2026 | 50 |
| Nov 26, 2026 | 50 |
| Nov 25, 2026 | 50 |
| Nov 24, 2026 | 50 |
| Nov 23, 2026 | 50 |
| Nov 22, 2026 | 50 |
| Nov 21, 2026 | 50 |
| Nov 20, 2026 | 50 |
| Nov 19, 2026 | 50 |
| Nov 18, 2026 | 50 |
| Nov 17, 2026 | 50 |
| Nov 16, 2026 | 50 |
| Nov 15, 2026 | 50 |
| Nov 14, 2026 | 50 |
| Nov 13, 2026 | 50 |
| Nov 12, 2026 | 50 |
| Nov 11, 2026 | 50 |
| Nov 10, 2026 | 50 |
| Nov 9, 2026 | 50 |
| Nov 8, 2026 | 50 |
| Nov 7, 2026 | 50 |
| Nov 6, 2026 | 50 |
| Nov 5, 2026 | 50 |
| Nov 4, 2026 | 50 |
| Nov 3, 2026 | 50 |
| Nov 2, 2026 | 50 |
| Nov 1, 2026 | 50 |
| Oct 31, 2026 | 50 |
| Oct 30, 2026 | 50 |
| Oct 29, 2026 | 50 |
| Oct 28, 2026 | 50 |
| Oct 27, 2026 | 50 |
| Oct 26, 2026 | 50 |
| Oct 25, 2026 | 50 |
| Oct 24, 2026 | 50 |
| Oct 23, 2026 | 50 |
| Oct 22, 2026 | 51 |
| Oct 21, 2026 | 50 |
| Oct 20, 2026 | 50 |
| Oct 19, 2026 | 50 |
| Oct 18, 2026 | 50 |
| Oct 17, 2026 | 50 |
| Oct 16, 2026 | 50 |
| Oct 15, 2026 | 50 |
| Oct 14, 2026 | 50 |
| Oct 13, 2026 | 50 |
| Oct 12, 2026 | 50 |
| Oct 11, 2026 | 50 |
| Oct 10, 2026 | 50 |
| Oct 9, 2026 | 50 |
| Oct 8, 2026 | 50 |
| Oct 7, 2026 | 50 |
| Oct 6, 2026 | 50 |
| Oct 5, 2026 | 50 |
| Oct 4, 2026 | 50 |
| Oct 3, 2026 | 50 |
| Oct 2, 2026 | 50 |
| Oct 1, 2026 | 50 |
| Sep 30, 2026 | 50 |
| Sep 29, 2026 | 50 |
| Sep 28, 2026 | 50 |
| Sep 27, 2026 | 50 |
| Sep 26, 2026 | 50 |
| Sep 25, 2026 | 50 |
| Sep 24, 2026 | 50 |
| Sep 23, 2026 | 50 |
| Sep 22, 2026 | 50 |
| Sep 21, 2026 | 50 |
| Sep 20, 2026 | 50 |
| Sep 19, 2026 | 50 |
| Sep 18, 2026 | 50 |
| Sep 17, 2026 | 50 |
| Sep 16, 2026 | 50 |
| Sep 15, 2026 | 50 |
| Sep 14, 2026 | 50 |
| Sep 13, 2026 | 50 |
| Sep 12, 2026 | 50 |
| Sep 11, 2026 | 50 |
| Sep 10, 2026 | 50 |
| Sep 9, 2026 | 50 |
| Sep 8, 2026 | 50 |
| Sep 7, 2026 | 50 |
131−30 since Sep 7
| Date | Weekly downloads |
|---|---|
| Dec 6, 2026 | 131 |
| Dec 5, 2026 | 113 |
| Dec 4, 2026 | 109 |
| Dec 3, 2026 | 113 |
| Dec 2, 2026 | 107 |
| Dec 1, 2026 | 105 |
| Nov 30, 2026 | 96 |
| Nov 29, 2026 | 92 |
| Nov 28, 2026 | 81 |
| Nov 27, 2026 | 80 |
| Nov 26, 2026 | 91 |
| Nov 25, 2026 | 91 |
| Nov 24, 2026 | 89 |
| Nov 23, 2026 | 88 |
| Nov 22, 2026 | 84 |
| Nov 21, 2026 | 90 |
| Nov 20, 2026 | 88 |
| Nov 19, 2026 | 64 |
| Nov 18, 2026 | 83 |
| Nov 17, 2026 | 94 |
| Nov 16, 2026 | 98 |
| Nov 15, 2026 | 106 |
| Nov 14, 2026 | 110 |
| Nov 13, 2026 | 106 |
| Nov 12, 2026 | 122 |
| Nov 11, 2026 | 107 |
| Nov 10, 2026 | 100 |
| Nov 9, 2026 | 97 |
| Nov 8, 2026 | 87 |
| Nov 7, 2026 | 75 |
| Nov 6, 2026 | 59 |
| Nov 5, 2026 | 45 |
| Nov 4, 2026 | 42 |
| Nov 3, 2026 | 44 |
| Nov 2, 2026 | 63 |
| Nov 1, 2026 | 89 |
| Oct 31, 2026 | 99 |
| Oct 30, 2026 | 142 |
| Oct 29, 2026 | 133 |
| Oct 28, 2026 | 124 |
| Oct 27, 2026 | 121 |
| Oct 26, 2026 | 103 |
| Oct 25, 2026 | 76 |
| Oct 24, 2026 | 69 |
| Oct 23, 2026 | 25 |
| Oct 22, 2026 | 34 |
| Oct 21, 2026 | 50 |
| Oct 20, 2026 | 48 |
| Oct 19, 2026 | 58 |
| Oct 18, 2026 | 57 |
| Oct 17, 2026 | 53 |
| Oct 16, 2026 | 54 |
| Oct 15, 2026 | 56 |
| Oct 14, 2026 | 56 |
| Oct 13, 2026 | 59 |
| Oct 12, 2026 | 51 |
| Oct 11, 2026 | 56 |
| Oct 10, 2026 | 69 |
| Oct 9, 2026 | 76 |
| Oct 8, 2026 | 68 |
| Oct 7, 2026 | 53 |
| Oct 6, 2026 | 47 |
| Oct 5, 2026 | 40 |
| Oct 4, 2026 | 40 |
| Oct 3, 2026 | 31 |
| Oct 2, 2026 | 27 |
| Oct 1, 2026 | 25 |
| Sep 30, 2026 | 32 |
| Sep 29, 2026 | 46 |
| Sep 28, 2026 | 49 |
| Sep 27, 2026 | 61 |
| Sep 26, 2026 | 74 |
| Sep 25, 2026 | 85 |
| Sep 24, 2026 | 86 |
| Sep 23, 2026 | 83 |
| Sep 22, 2026 | 70 |
| Sep 21, 2026 | 68 |
| Sep 20, 2026 | 54 |
| Sep 19, 2026 | 43 |
| Sep 18, 2026 | 70 |
| Sep 17, 2026 | 101 |
| Sep 16, 2026 | 131 |
| Sep 15, 2026 | 136 |
| Sep 14, 2026 | 153 |
| Sep 13, 2026 | 169 |
| Sep 12, 2026 | 197 |
| Sep 11, 2026 | 196 |
| Sep 10, 2026 | 186 |
| Sep 9, 2026 | 182 |
| Sep 8, 2026 | 175 |
| Sep 7, 2026 | 161 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/1033487453-root)<a href="https://payloaddirectory.dev/plugins/1033487453-root"><img src="https://payloaddirectory.dev/badge/1033487453-root.svg" alt="Payload Directory"></a>README
A Payload CMS plugin that integrates Google PageSpeed Insights into your project. Use it to analyze pages and view performance metrics directly in your Payload admin ui.
pnpm add payload-plugin-pagespeed
[!IMPORTANT]
Make sure to get a PageSpeed Insights API key as this plugin requires one to communicate with the PageSpeed API.
Add the plugin to your payload.config.ts:
import { buildConfig } from 'payload/config'
import { pageSpeedPlugin } from 'payload-plugin-pagespeed'
export default buildConfig({
// ... your config
plugins: [
// ... your other plugins
pageSpeedPlugin({
apiKey: process.env.PAGESPEED_API_KEY, // Required
}),
],
})
Now start your Payload app:
pnpm dev
You’ll see a new collection in the admin panel where your PageSpeed Insight reports are stored, by default this is the PageSpeed Insights collection.
PageSpeed Insights collection in the Payload admin.URL.The plugin accepts the following options:
| Key | Type | Description |
|---|---|---|
apiKey* | string (required) | A Google PageSpeed Insights API key. |
debug | boolean | A boolean that, when true, shows debug information and the hidden reports collection. |
disabled | boolean | A boolean that, when true, prevents the plugin from mounting the api endpoint in collection config. |
generateFileName | function (GenerateFileNameFn) | An optional function that is invoked to generate a filename for a PageSpeed Insights report object. |
generateFilePrefix | function (GenerateFilePrefixFn) | An optional function that is invoked to generate a file prefix for a PageSpeed Insights report object if using a storage adapter. |
overrideInsightsCollection | function (CollectionOverride) | A function used to override the default PageSpeed Insights collection. |
overrideReportsCollection | function (CollectionOverride) | A function used to override the default PageSpeed Reports collection. |
[!NOTE] In order to successfully work, the user making the request needs to have both
readandcreateaccess for the PageSpeed Insights collection. In addition, this plugin sets theupdateaccess control on the PageSpeed Insights collection tofalse. An example below shows customizing access controls and other collection configs.
import { buildConfig } from 'payload/config'
import { pageSpeedPlugin } from 'payload-plugin-pagespeed'
export default buildConfig({
// ... your config
plugins: [
// ... your other plugins
pageSpeedPlugin({
apiKey: process.env.PAGESPEED_API_KEY, // Required
overrideInsightsCollection: (collection) => ({
...collection,
access: {
...collection,
read: () => true, // Anyone can read the insights collection
create: () => true, // Anyone can create an insights report
}
// ... other overrides
})
}),
],
})
import { s3Storage } from '@payloadcms/storage-s3'
import { buildConfig } from 'payload/config'
import { pageSpeedPlugin } from 'payload-plugin-pagespeed'
export default buildConfig({
// ... your config
plugins: [
// ... your other plugins
s3Storage({
bucket: process.env.S3_BUCKET || '',
collections: {
'pagespeed-reports': true,
},
config: {
credentials: {
accessKeyId: process.env.S3_ACCESS_KEY_ID || '',
secretAccessKey: process.env.S3_SECRET || '',
},
endpoint: process.env.S3_ENDPOINT || '',
region: process.env.S3_REGION || '',
},
})
pageSpeedPlugin({
apiKey: process.env.PAGESPEED_API_KEY, // Required
generateFilePrefix: ({ collection, req }) => { ... } // Save to specific folder in storage
}),
],
})
GET <api-route>/<insights-slug>/:id?/report
The URL segment for api-route is your Payload configured base API route (by default /api), insights-slug is the collection slug for the PageSpeed Insights collection (by default pagespeed-insights), and :id? is an optional parameter representing a PageSpeed Insights doc id.
If a doc id is passed as a url segment, then the query parameters are overriden by the fields in the doc. To view available query parameters, see the PageSpeed API Reference.
If no doc id is provided, then the url query parameter is required.
GET /api/pagespeed-insights/report?url=https://payloadcms.com
GET /api/pagespeed-insights/68aa352d42f08695dd833412/report
A successful request will return:
| Parameter | Type | Description |
|---|---|---|
report | PageSpeedReportObject | string | number | The pagespeed report. This will be a document id if the insights document already has a report generated. |
message | string | A message containing the status message of the operation. |
Contributions are welcome!
If you’d like to improve this plugin, feel free to open an issue or PR.
MIT © 2025 saikhon.dev
payload plugin ab
A/B testing with page variants managed in the Payload admin and routed by Next.js middleware at the edge
741.0k/wk37v3
payload plugin analytics
GA4-backed analytics dashboard in the Payload admin with a client-side tracking layer for Next.js front ends
70821/wk37v3
payload posthog
Native PostHog integration for Payload Admin covering analytics, session replay, error tracking, logs and feature flags
791.7k/wk0v3
analytics
Analytics Settings global for Google tags, custom scripts, pixels and UTM cookies on Next.js sites, with consent…
77627/wk0v4
payload plugin stats
Privacy-preserving user count statistics for the Payload admin, with small groups hidden
7380/wk0v3
tracking
Tracking global and React providers for PostHog, Google Tag Manager and Vercel Analytics
6132/wk37v3