{"id":295972,"date":"2026-04-13T09:19:30","date_gmt":"2026-04-13T09:19:30","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/headless-ga4\/"},"modified":"2026-04-13T09:19:11","modified_gmt":"2026-04-13T09:19:11","slug":"headless-ga4","status":"publish","type":"plugin","link":"https:\/\/vi.wordpress.org\/plugins\/headless-ga4\/","author":23422967,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.1.1","stable_tag":"0.1.1","tested":"6.9.4","requires":"6.4","requires_php":"7.4","requires_plugins":null,"header_name":"Headless GA4","header_author":"Studio JKN","header_description":"Display lightweight GA4 data in the WordPress dashboard for headless frontends.","assets_banners_color":"","last_updated":"2026-04-13 09:19:11","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/studio.jakubkanna.com\/","header_author_uri":"https:\/\/studio.jakubkanna.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":29,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"0.1.1":{"tag":"0.1.1","author":"jakubkanna","date":"2026-04-13 09:19:11"}},"upgrade_notice":{"0.1.1":"<p>Maintenance release for plugin review fixes.<\/p>","0.1.0":"<p>Initial public release.<\/p>"},"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1.1"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"Settings page for GA4 property ID and service account JSON","2":"Dashboard widget with summary cards, trend chart, top pages, and top traffic sources"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[83,232,434,193472,141196],"plugin_category":[36],"plugin_contributors":[252364],"plugin_business_model":[],"class_list":["post-295972","plugin","type-plugin","status-publish","hentry","plugin_tags-admin","plugin_tags-analytics","plugin_tags-dashboard","plugin_tags-ga4","plugin_tags-headless","plugin_category-analytics","plugin_contributors-jakubkanna","plugin_committers-jakubkanna"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/headless-ga4.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Headless GA4 adds a compact Google Analytics 4 widget to the main WordPress dashboard.<\/p>\n\n<p>It is designed for sites where:<\/p>\n\n<ul>\n<li>the frontend is not rendered by WordPress<\/li>\n<li>GA4 tracking already happens on the frontend<\/li>\n<li>WordPress only needs to read and display GA4 reporting data for admins<\/li>\n<\/ul>\n\n<p>The plugin uses the Google Analytics Data API and a Google service account. It does not inject frontend tracking code.<\/p>\n\n<p>Features:<\/p>\n\n<ul>\n<li>settings page for GA4 configuration<\/li>\n<li>dashboard widget with core traffic metrics<\/li>\n<li>last 7 days trend chart<\/li>\n<li>top pages and top traffic sources<\/li>\n<li>transient caching<\/li>\n<li>manual refresh action<\/li>\n<\/ul>\n\n<h3>Privacy<\/h3>\n\n<p>Headless GA4 does not track visitors or inject analytics scripts.<\/p>\n\n<p>The plugin only sends server-side requests to Google when an administrator configures a GA4 property and opens the dashboard or tests the connection. Those requests use the service account credentials you provide in the plugin settings.<\/p>\n\n<h3>External services<\/h3>\n\n<p>This plugin connects to Google services to authenticate requests and fetch Google Analytics 4 report data. These requests are only made after an administrator configures the plugin and then opens the dashboard widget, refreshes the data, or uses the Test connection button.<\/p>\n\n<h4>Google OAuth token service (`oauth2.googleapis.com`)<\/h4>\n\n<p>Used to exchange the configured Google service account credentials for a short-lived access token.<\/p>\n\n<p>Data sent: a signed JWT assertion containing the service account email, requested scope, token endpoint, issued-at time, and expiration time.<\/p>\n\n<p>Terms of service: https:\/\/developers.google.com\/terms\nPrivacy policy: https:\/\/policies.google.com\/privacy<\/p>\n\n<h4>Google Analytics Data API (`analyticsdata.googleapis.com`)<\/h4>\n\n<p>Used to request GA4 report data for the configured GA4 property.<\/p>\n\n<p>Data sent: the GA4 property ID, report request parameters such as date ranges, dimensions, metrics, and limits, plus the OAuth access token in the request headers.<\/p>\n\n<p>Terms of service: https:\/\/developers.google.com\/terms\nPrivacy policy: https:\/\/policies.google.com\/privacy<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>headless-ga4<\/code> folder to <code>\/wp-content\/plugins\/<\/code>.<\/li>\n<li>Activate the plugin through the WordPress Plugins screen.<\/li>\n<li>Go to <code>Settings &gt; Headless GA4<\/code>.<\/li>\n<li>Enter your GA4 property ID.<\/li>\n<li>Paste your service account JSON credentials.<\/li>\n<li>Save the settings.<\/li>\n<li>Use the <code>Test connection<\/code> button.<\/li>\n<li>Open the main Dashboard screen to view the widget.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"what%20is%20a%20service%20account%3F\"><h3>What is a service account?<\/h3><\/dt>\n<dd><p>A service account is a Google Cloud machine identity used by the plugin to read your GA4 reporting data without requiring a human Google login inside wp-admin.<\/p><\/dd>\n<dt id=\"does%20this%20plugin%20install%20tracking%20on%20my%20site%3F\"><h3>Does this plugin install tracking on my site?<\/h3><\/dt>\n<dd><p>No. This plugin only reads GA4 report data. Your frontend must already send data to GA4.<\/p><\/dd>\n<dt id=\"what%20do%20i%20need%20from%20google%3F\"><h3>What do I need from Google?<\/h3><\/dt>\n<dd><p>You need:<\/p>\n\n<ul>\n<li>a Google Cloud project<\/li>\n<li>the Google Analytics Data API enabled<\/li>\n<li>a service account<\/li>\n<li>the full service account JSON credentials<\/li>\n<li>Viewer access for that service account email in your GA4 property<\/li>\n<li>your GA4 numeric property ID<\/li>\n<\/ul><\/dd>\n<dt id=\"how%20do%20i%20set%20it%20up%3F\"><h3>How do I set it up?<\/h3><\/dt>\n<dd><ol>\n<li>Create a Google Cloud project.<\/li>\n<li>In Google Cloud Console, open <code>APIs &amp; Services<\/code>, click <code>Enable APIs and Services<\/code>, search for <code>Google Analytics Data API<\/code>, open it, and click <code>Enable<\/code>.<\/li>\n<li>Create a service account.<\/li>\n<li>Open the service account, go to <code>Keys<\/code>, click <code>Add key<\/code>, choose <code>Create new key<\/code>, then select <code>JSON<\/code> and download the file.<\/li>\n<li>Copy the service account email address.<\/li>\n<li>In GA4, open <code>Admin<\/code>, then <code>Property access management<\/code>, add that service account email, and grant it <code>Viewer<\/code> access.<\/li>\n<li>In GA4, open <code>Admin<\/code>, then <code>Property settings<\/code>, and copy the numeric <code>Property ID<\/code>.<\/li>\n<li>Paste the property ID and the full service account JSON into the plugin settings.<\/li>\n<li>Save the settings and test the connection.<\/li>\n<\/ol><\/dd>\n<dt id=\"why%20do%20i%20not%20see%20any%20data%3F\"><h3>Why do I not see any data?<\/h3><\/dt>\n<dd><p>Possible reasons:<\/p>\n\n<ul>\n<li>the frontend is not sending GA4 events<\/li>\n<li>the wrong property ID was entered<\/li>\n<li>the service account email was not added in <code>GA4 &gt; Admin &gt; Property access management<\/code><\/li>\n<li>the service account JSON is invalid<\/li>\n<li>the property has not received enough recent traffic<\/li>\n<\/ul><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.1.1<\/h4>\n\n<ul>\n<li>Replace inline admin CSS with an enqueued stylesheet<\/li>\n<li>Move admin screen markup into template files<\/li>\n<li>Remove deprecated OpenSSL cleanup call<\/li>\n<li>Add external service disclosures for Google services<\/li>\n<\/ul>\n\n<h4>0.1.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<li>Settings page with service account configuration<\/li>\n<li>Dashboard widget with traffic summary<\/li>\n<li>GA4 Data API integration using a service account<\/li>\n<\/ul>","raw_excerpt":"Display lightweight GA4 traffic data in the WordPress dashboard for headless frontends.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/vi.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/295972","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vi.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/vi.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/vi.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=295972"}],"author":[{"embeddable":true,"href":"https:\/\/vi.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/jakubkanna"}],"wp:attachment":[{"href":"https:\/\/vi.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=295972"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/vi.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=295972"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/vi.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=295972"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/vi.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=295972"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/vi.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=295972"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/vi.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=295972"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}