=== The Hits List ===
Contributors: adamgreenwell
Tags: popular posts, post views, page views, migration, blocks
Requires at least: 6.2
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.3.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Track post views locally, display popular posts, and migrate Top 10 data into a completely free, drop-in replacement.

== Description ==

The Hits List keeps post view tracking on your own WordPress site and gives you block, widget, and template-tag tools for displaying popular content.

Key features:

* Local view tracking stored in WordPress database tables
* Overall and daily popular-post counts
* Popular Posts block and widget support
* WordPress dashboard cards for daily top posts, all-time top posts, and views over time
* Top 10 migration compatibility with rerun-safe imports
* REST-based tracking with AJAX fallback
* Privacy-policy integration for site owners

== Installation ==

1. Upload the `the-hits-list` folder to `/wp-content/plugins/`.
2. Activate The Hits List through the Plugins screen in WordPress.
3. Go to Settings > The Hits List to configure tracking and display options.
4. If Top 10 data is detected, use the import button on the settings screen to migrate existing counts.

== Frequently Asked Questions ==

= Does this send data to a third-party service? =

No. The Hits List stores tracking data locally in your WordPress database and does not call a third-party analytics endpoint.

= Can I migrate from Top 10? =

Yes. The plugin can import compatible overall and daily counts from Top 10 tables. Imports are rerun-safe, so repeating the import does not double-count unchanged source data.

= How long is daily data kept? =

Daily buckets are retained for 180 days by default. Older daily rows are pruned automatically by a scheduled cleanup task.

== Privacy ==

The Hits List stores post view counts locally in the `hits_list` and `hits_list_daily` database tables (table prefix may vary).

It does not send tracking data to a third-party analytics service.

Daily tracking buckets are retained for 180 days by default and older rows are removed automatically.

You are responsible for describing your use of visitor analytics on your own site as needed.

== Source Code and Build Tools ==

The compiled block assets in `blocks/popular-posts/build/` are generated from the human-readable source files included in `blocks/popular-posts/src/`.

To rebuild the block assets:

1. Go to `blocks/popular-posts/`.
2. Run `npm install`.
3. Run `npm run build`.

The block build uses `@wordpress/scripts`. Runtime PHP, vanilla JavaScript, and CSS assets outside the block build are maintained directly in the plugin source.

== Changelog ==

= 1.3.0 =

* Added WordPress dashboard cards for daily top posts, all-time top posts, and views over time.
* Added post list table columns for total, daily, and condensed view counts.
* Hardened public REST tracking and counter endpoints.
* Removed the legacy query-string tracking endpoint.

= 1.2.0 =

* Normalized tracking to use server-derived blog IDs and validated post targets.
* Reworked daily tracking into true site-local day buckets with upgrade migration support.
* Added rerun-safe Top 10 import state handling.
