=== Google Search Console Stats ===
Contributors: contentpowered
Author: Content Powered
Author URI: https://www.contentpowered.com/wordpress-plugins/
Plugin URI: https://www.contentpowered.com
Tags: search console, google search console, clicks, impressions, seo
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.2
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Adds Clicks and Impressions columns from Google Search Console to your Posts and Pages screens, synced once a day in the background.

== Description ==

See which content actually gets found in Google without leaving WordPress or opening another dashboard. Connect your Search Console account once, pick your property, and every post and page shows its clicks and impressions for the last 28 days. Sort by either column to find your top performers, or the posts nobody sees in search.

Data syncs in the background once a day and is stored locally, so your Posts screen loads as fast as it always has and you never run into Google's API limits.

= Features =

* Clicks and Impressions columns on posts, pages, and any public post type, such as products.
* Sortable columns to rank content by search performance.
* Date range options: 7, 28 or 90 days, or the last 12 months. Each person can switch from the filter bar, and their choice is remembered.
* Trend arrows showing the change against the previous period. Up and green always means better.
* Optional CTR and average position columns, off by default to keep things clean.
* An Overview with your totals, top posts and pages, posts that are seen a lot but rarely clicked, and the biggest gains and losses.
* Daily background sync, with no API calls when the page loads.
* Read-only access, so the plugin never changes anything in Search Console.
* Works with domain and URL-prefix properties, and matches URLs with or without trailing slashes, www or not, http or https, #anchors, tracking parameters, AMP and paginated URLs.
* Nothing on the front end, so zero impact on PageSpeed.

= Two ways to connect =

* **Sign in with Google**, using a free OAuth client you create in your own Google Cloud project. The settings page walks you through it step by step, with the exact redirect address to copy.
* **A service account key**, best for agencies: one key works on every site you add it to in Search Console, including staging and local sites.

Either way, the plugin asks only for read-only Search Console access. Tokens and keys are stored encrypted, never shown again, and removed (and revoked at Google) when you disconnect or delete the plugin.

Find it under Content Powered > Google Search Console Stats in the admin menu.

Found a bug or have an idea? Use Content Powered > Report a Bug or Content Powered > Submit Feedback to send it straight to us.

= Credits =

* Icons by [Lucide](https://lucide.dev), used under the ISC License. Icons derived from [Feather](https://feathericons.com) are under the MIT License. The full license text is in `icons/LICENSE`.
* The Google logo on the sign-in button is from [Simple Icons](https://simpleicons.org), CC0 1.0. Google is a trademark of Google LLC.
* Updates delivered by [Plugin Update Checker](https://github.com/YahnisElsts/plugin-update-checker) by Janis Elsts, MIT License.

== Installation ==

1. Upload the `gsc-stats` folder to `/wp-content/plugins/`.
2. Activate the plugin through the Plugins screen in WordPress.
3. Go to Content Powered > Google Search Console Stats, open the Connection tab and follow the steps.

Updates arrive through the normal WordPress Updates screen, and you can turn on auto-updates from the Plugins screen.

== Frequently Asked Questions ==

= Why do I need to create something in Google Cloud? =

Google only gives Search Console data to an app the account owner approves. Creating your own OAuth client (or service account) means the access belongs to you alone: your data goes straight from Google to your site, never through anyone else's server. It's free, takes about five minutes, and the Connection tab shows each step.

= Why don't the numbers match Search Console exactly? =

They're per page, for your posts and pages only. Search Console's totals also count the home page, categories and other URLs, and it counts site-wide impressions slightly differently from page impressions. The Overview shows what share of the property's clicks went to your posts, and lists the top URLs that aren't posts. The newest numbers are also two or three days old, because the plugin uses Search Console's final data.

= Does it slow down my Posts screen? =

No. The numbers are fetched once a day in the background and stored in a small table on your site. The Posts screen reads them with one quick database query, and never calls Google.

= Can it change anything in my Search Console account? =

No. It only ever asks Google for read-only access to Search Console data. A service account only needs the Restricted permission.

= Which property should I choose? =

A domain property (example.com) when you have one, because it covers every version of the site: http and https, with and without www. A URL-prefix property works too. The plugin picks the one that matches this site when it can.

= Why does it say Google ended the connection? =

The access was removed from your Google account, your password changed, or the OAuth app is still in Testing mode, where Google signs you out after 7 days. Publish the app (Google Auth Platform, Audience, Publish app), then click Sign in with Google again. The numbers you already have stay in place.

= Who can see the numbers? =

Editors and administrators by default. You can limit them to administrators, or show them to everyone who can write posts. The settings page is always for administrators only.

= How do I get updates? =

Through the normal WordPress Updates screen. The plugin checks our GitHub releases twice a day, and you can update with one click or turn on auto-updates from the Plugins screen.

== Changelog ==

See https://github.com/jmsprsns/gsc-stats/releases for the full release history.
