=== PubPulse Analytics ===
Contributors: pubpulse
Tags: analytics, statistics, privacy, cookieless, real-time
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Cookieless, real-time analytics for publishers: author and category reports, AI-assistant and Google Discover traffic, AMP support.

== Description ==

PubPulse is web analytics made for content sites. This plugin connects your WordPress site to your PubPulse account in one step.

* **No cookies, no stored IP addresses.** The tracking script is about 1 KB.
* **Live numbers.** Users and sessions per article, refreshed every 10 seconds.
* **Author and category reports.** Each post view carries the author, category, article ID, title and publish date as custom dimensions.
* **AI traffic.** Clicks from ChatGPT, Perplexity, Claude, Gemini, Copilot and Google AI Overviews, each as its own source.
* **Google Discover and Google News** kept apart from Google search.
* **AMP pages** made by the official AMP plugin are tracked too.
* **Your team is not counted.** Visits from logged-in authors, editors and administrators are left out (can be turned off).
* **Outbound link clicks** as events, if you want them.

You need a PubPulse account. Every plan starts with a 30-day free trial, with every feature and no credit card: [pubpulse.pro](https://pubpulse.pro). See the [live demo](https://pubpulse.pro/demo).

== External services ==

This plugin connects to PubPulse, the analytics service at pubpulse.pro, to measure visits to your site.

* **What is loaded:** the tracking script from `https://pubpulse.pro/js/script.manual.min.js` on every front-end page (not in wp-admin), unless you exclude logged-in staff.
* **What is sent, and when:** when a visitor views a page, their browser sends the page URL, the referring URL, the page title, the screen width, the browser language and, on posts, the author, category, article ID, title and publish date to `https://pubpulse.pro/api/collect`. On AMP pages the same data goes to `https://pubpulse.pro/api/event`. If you turn on outbound link tracking, the host name of the clicked link is sent too.
* **What is not stored:** PubPulse sets no cookies and does not store IP addresses; the IP address and user agent are used only to compute a daily visitor ID that cannot be reversed, and the country and city of the visit are looked up from the IP address without keeping it.
* Terms of service: https://pubpulse.pro/terms
* Privacy policy: https://pubpulse.pro/privacy

Nothing is sent until you enter your data domain in Settings → PubPulse.

== Installation ==

1. Install and activate the plugin.
2. In PubPulse, open Settings → Tracking Code and copy your data domain (it looks like `example.com/AbC123`).
3. In WordPress, go to Settings → PubPulse, paste it and save.
4. Open your site in a private window and check Real Time in PubPulse.
5. Optional: in PubPulse, press "Register these dimensions" under Settings → Tracking Code → Via WordPress Plugins, so author and category appear as report tabs.

== Frequently Asked Questions ==

= Do I need a cookie banner for PubPulse? =

PubPulse sets no cookies and stores no IP addresses. Whether your site needs a banner depends on everything else it loads; ask your own adviser.

= My visits do not show up =

You are probably logged in as an editor or administrator: those visits are left out by default. Use a private window. If you use a caching or optimisation plugin, clear its cache; the plugin already asks WP Rocket, LiteSpeed Cache and Autoptimize to leave the script alone.

= Can I add my own dimensions? =

Yes, with the `pubpulse_dimensions` filter:

`add_filter( 'pubpulse_dimensions', function ( $props ) { $props['word_count'] = str_word_count( wp_strip_all_tags( get_the_content() ) ); return $props; } );`

= Can I skip tracking on some pages? =

Return false from the `pubpulse_should_track` filter.

= Does it work with several sites in one PubPulse network? =

Yes. Enter several data domains separated by commas, and the same visit counts for each.

== Screenshots ==

1. The PubPulse dashboard: live visitors, top pages and sources.
2. The AI traffic report.
3. The plugin settings page in WordPress.

== Changelog ==

= 1.0.0 =
* First release: tracking script, article dimensions, staff exclusion, outbound clicks, AMP support.

== Upgrade Notice ==

= 1.0.0 =
First release.
