=== FlarePanel Analytics ===
Contributors: flarepanel
Tags: analytics, privacy, ai crawlers, gptbot, woocommerce
Requires at least: 6.3
Tested up to: 7.1
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 analytics for WordPress, and a record of which AI crawlers (GPTBot, ClaudeBot, PerplexityBot) read your site.

== Description ==

FlarePanel is open-source web and product analytics. This plugin connects your WordPress site to it: paste your client ID and visits, sources, pages, countries and devices start showing up in your FlarePanel dashboard.

* **No cookies.** FlarePanel does not set tracking cookies or store visitor ids in the browser.
* **AI crawlers.** GPTBot, ClaudeBot, PerplexityBot and other AI crawlers never run JavaScript, so script-based analytics cannot see them. With your client secret, this plugin reports their page requests from your server, and FlarePanel shows which bots read which pages, and where they got errors.
* **WooCommerce revenue.** Orders are sent as revenue from the thank-you page, so you see which sources and pages bring sales.
* **Clicks without code.** Links to other sites, and any element with a `data-track` attribute, are counted automatically.
* **Leave your team out.** Logged-in administrators and editors are not counted (you choose the roles).
* **Dashboard widget.** Your traffic chart on the WordPress dashboard.
* **Self-hosted too.** FlarePanel is open source (AGPL-3.0). Point the plugin at your own install with two settings.

You need a FlarePanel account (30 days free, no card) or your own FlarePanel install.

== Installation ==

1. Install and activate the plugin.
2. Create a project at [flarepanel.dev](https://flarepanel.dev) and copy its client ID (Settings → Clients).
3. In WordPress, open Settings → FlarePanel and paste the client ID. Save.
4. Optional: paste the client secret to report AI crawlers, and the traffic widget link for the dashboard chart.

== Frequently Asked Questions ==

= Do I need a cookie banner? =

FlarePanel sets no tracking cookies and stores nothing in the browser to recognise visitors. Whether you need consent still depends on where you operate and what else your site does.

= Why does the AI crawler report need a client secret? =

The crawler endpoint only accepts reports from servers, so nobody can send fake bot traffic to your project. The secret is stored in your WordPress options and is never printed into your pages.

= I use a page cache. =

Pages served from a full-page cache (some caching plugins, a CDN) never reach WordPress, so crawler visits to those pages are not reported. If your site is behind Cloudflare, connect Cloudflare in FlarePanel to import those crawler visits as well. Visitor tracking is not affected.

= Can I change what is sent? =

Developers can use the filters `flarepanel_should_track`, `flarepanel_init_options`, `flarepanel_crawl_hit` and `flarepanel_order_properties`.

== External services ==

This plugin connects your site to FlarePanel, a web analytics service, so you can see how your site is used.

* **Visitor tracking.** On public pages, the plugin loads the tracking script from `https://flarepanel.dev/op1.js` (or the script URL you set) in the visitor's browser. The script sends page views and the events described above to `https://api.flarepanel.dev` (or the API URL you set): the page address, referrer, screen size, browser and operating system, and the visitor's IP address, which FlarePanel uses to estimate location and a daily rotating visitor id and does not store. It runs on every public page for visitors who are not excluded by role.
* **AI crawler reports.** When a client secret is set, after serving a page to a request whose user agent looks like a bot, your server sends the page path, your site's host, the bot's user agent, the referrer and the response status to `https://api.flarepanel.dev/track/crawl`. Nothing is sent for human visitors.
* **WooCommerce.** On the order-received page, the order total, currency, number of items and order id are sent as a revenue event.
* **Dashboard widget.** When you set a widget link, the WordPress dashboard shows that FlarePanel page in a frame.

FlarePanel terms: https://flarepanel.dev/terms
FlarePanel privacy policy: https://flarepanel.dev/privacy

== Changelog ==

= 1.0.0 =
* First release: tracking script, role exclusion, AI crawler reports, WooCommerce revenue, dashboard widget, self-hosted settings.
