=== EBS Content Metrics for Google Search Console ===
Contributors: ebubekirbastama
Tags: google search console, seo, analytics, content analysis, search metrics
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Display Google Search Console performance data for WordPress posts and pages inside the admin dashboard.

== Description ==

EBS Content Metrics for Google Search Console is a lightweight analytics plugin that allows WordPress administrators to view search performance data directly within the admin panel.

The plugin retrieves page-level performance metrics such as clicks and impressions from Google Search Console and displays them in a structured and filterable table.

It is designed for content creators, SEO specialists, and site owners who want to analyze content performance without leaving the WordPress dashboard.

Main features:

* Retrieve Google Search Console data using a secure service account
* View clicks and impressions per post and page
* Analyze performance across multiple time periods (6 months, 12 months, 16 months)
* Filter and search content by title or URL
* Sort data by clicks or impressions
* Bulk actions for managing content
* Lightweight JSON-based storage system (no database load)
* Fast and responsive admin interface

This plugin does NOT track visitors and does NOT send any data to the plugin author.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/ebs-content-metrics-for-google-search-console/` directory, or install the plugin through the WordPress Plugins screen.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Create a Google Service Account from Google Cloud Console.
4. Download the service account JSON key file.
5. Upload the JSON file to the plugin directory and name it:
   `service-account.json`
6. Add the service account email as a user to your Google Search Console property (with read access).
7. Go to the WordPress admin panel and open "EBS Metrics".
8. Click "Sync Data" to fetch your Search Console data.

Note:
The service account JSON file must be securely stored. It is recommended to restrict file access using server-level permissions or move the file outside the public web directory if possible.

== How It Works ==

The plugin connects to Google Search Console API and retrieves performance data for your website.

* It fetches data for published posts and pages
* It matches URLs with your WordPress content
* It aggregates clicks and impressions
* It stores results in a local JSON file (`ebs-stats-db.json`)
* It displays the results inside the admin panel

Data is only fetched when the administrator manually triggers synchronization.

== External Services ==

This plugin connects to Google services to retrieve Google Search Console performance data.

Service used:
Google Search Console API and Google OAuth 2.0 token endpoint

What the service is used for:
The plugin uses the Google Search Console API to retrieve page-level search performance data such as clicks and impressions for WordPress posts and pages.

What data is sent:

* The site URL
* A signed service account authentication request (JWT)

When data is sent:
Only when the administrator clicks the "Sync Data" button.

What data is received:

* Page URLs
* Click counts
* Impression counts

Permissions:
https://www.googleapis.com/auth/webmasters.readonly

Service provider:
Google LLC

Terms of Service:
https://policies.google.com/terms

Privacy Policy:
https://policies.google.com/privacy

== Frequently Asked Questions ==

= Does this plugin track users? =
No. This plugin does not track visitors or collect personal data.

= Does this plugin send data to external servers? =
It only communicates with Google Search Console API to retrieve analytics data.

= Do I need Google Search Console access? =
Yes. You must have access to your site in Google Search Console.

= What permissions are required? =
The plugin uses read-only access to Google Search Console.

= Where is the data stored? =
Data is stored locally in a JSON file inside the plugin directory.

== Changelog ==

= 1.0.0 =

* Initial release
* Google Search Console integration
* Admin dashboard with filtering and sorting
* JSON-based data storage

== Upgrade Notice ==

= 1.0.0 =
Initial stable release.
