Analytics plugins for Payload CMS 23

Report Payload CMS errors to Sentry with the official plugin. Bring GA4 or PostHog reports into the admin, and add Tag Manager or a consent banner.

Creates and syncs Dub shortlinks for Payload documents as they are published

Sends Payload server errors and selected HTTP errors to Sentry with user context

Splits page traffic between variants you create in the Payload admin

Sales totals by period, product and customer for Payload ecommerce stores

Logs AI crawler visits, serves llms.txt and shows an AI visibility dashboard

Tracks AI API token spend and stops jobs when daily, monthly or per-job budgets run out

A/B testing for blocks, pages and flags with statistics inside the admin

Self-hosted and third-party web analytics with dashboard widgets

Google Tag Manager with automatic dataLayer event discovery and an editable event registry

Routes website tracking events to Google Tag Manager, GA4 and HubSpot with consent checks

Adds KPI figures, lists and charts to the Payload admin dashboard, read from your collections

Records conversions once and delivers them to GA4, Google Ads and Meta

Framework-agnostic cookie consent state, Google Consent Mode v2 and consent-gated script loading

Shows GA4 traffic stats and live visitors as widgets in the Payload admin dashboard

Cookie banner and script gating for Payload, with consent services managed in the admin panel

Adds PostHog analytics, feature flags, session replay and error tracking to Payload

Adds a GA4-backed analytics dashboard and event tracking to the Payload admin

Tracks token usage, cost and sessions for LLM agent runs

Adds PostHog, Google Tag Manager and Vercel Analytics to a site from one global

Shows Google Analytics 4 widgets and a dashboard inside the admin panel

About these packages

Analytics plugins either send data out of a Payload project or bring reports into the admin panel. Some add tracking scripts and consent rules to your frontend. Others show GA4 or PostHog data as dashboard widgets. The official Sentry plugin reports errors.

What these plugins cover

  • The official Sentry plugin for server errors and admin UI crashes
  • GA4, PostHog and Plausible reports on the admin dashboard
  • Google Tag Manager with an editable dataLayer event registry
  • Consent Management with a cookie banner and script gating
  • A/B Testing for page variants and Attribution for ad conversions
  • Dashboard Widgets for KPI figures and charts from your collections

Choosing an analytics plugin

First decide where the numbers should end up. For reports next to your content, pick the dashboard plugin for the service you already use. Most of them read GA4. The adapter-based Analytics plugin also works with Plausible, Umami or PostHog. To control what the site sends, use Google Tag Manager or an event plugin. Add Consent Management if visitors must agree to tracking first. Sentry reports errors rather than traffic, so it can run next to any of these.

Frequently asked questions

How do I add Google Analytics to Payload CMS?

Payload does not add scripts to your pages. Put the GA4 tag into your site's layout, or load it through the Google Tag Manager plugin. To read GA4 reports in the admin, add a dashboard plugin such as Google Analytics Dashboard.

How do I set up Sentry for Payload CMS?

Set up @sentry/nextjs in your Next.js app first. Then add the official Sentry plugin to the plugins array and pass it the Sentry instance. From then on it reports Payload server errors and admin crashes to your Sentry project.

Can I run A/B tests with Payload CMS?

Yes. The A/B Testing plugin lets editors create page variants in the Payload admin and routes traffic between them at the edge. Your analytics service then shows which variant performs better.