A comprehensive GA4 dashboard with real-time metrics, traffic insights, audience breakdowns, content performance, and more — directly inside Sanity Studio.
$ npm install sanity-plugin-ga-dashboard
added 1 packages in 2.1s
$
7
Dashboard Tabs
16
Parallel Queries
Live
Real-time Data
< 3 min
Setup Time
What you get
Seven dashboard tabs covering every aspect of your website performance, powered by 16 parallel GA4 API queries.
Users, sessions, pageviews, bounce rate, engagement, and session duration — 10 KPIs at a glance.
Time series charts, hourly breakdowns, and channel grouping to understand your traffic patterns.
Top pages and landing pages with views and sessions — know what content drives engagement.
Device categories, browser & OS breakdowns, and new vs returning visitor analysis.
Top countries and cities by user count. Understand where your audience lives.
Top events, traffic sources, referrers, and acquisition channels in one view.
See how many users are active right now with live data from the past 30 minutes.
Switch between 7, 14, 30, and 90 day views to analyze short and long-term trends.
JWT-based service account authentication. No OAuth login flow required.
Quick Setup
import { defineConfig } from 'sanity'
import { googleAnalyticsPlugin } from 'sanity-plugin-ga-dashboard'
export default defineConfig({
plugins: [
googleAnalyticsPlugin(),
],
schema: {
types: [/* your schemas */],
},
})// app/api/analytics/route.ts
export { GET } from 'sanity-plugin-ga-dashboard/api'# .env.local
GA_PROPERTY_ID=123456789
GA_SERVICE_ACCOUNT_EMAIL=my-sa@project.iam.gserviceaccount.com
GA_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"Install the plugin and view your GA4 data inside Sanity Studio in under 3 minutes.