FPAI – First-Party AI Analytics

Opis

FPAI is a privacy-friendly analytics plugin that collects visitor data directly on your WordPress database. No cookies, no external tracking, no data sent to third parties.

Use your own AI (Claude, ChatGPT, Gemini, Grok, and more) to analyze your site’s performance — right from the WordPress admin.

Key Features

  • Cookie-free tracking — no cookies, no third-party requests
  • Storage-less Mode (new in 1.1.0) — track EU visitors with zero device storage (no cookies, no localStorage); many sites can run without a cookie banner. Auto mode detects EU visitors and applies it automatically
  • First-party data — All data stored in your MySQL database
  • Built-in AI chat — Ask questions about your analytics in natural language
  • 9 AI providers — Claude, GPT, Gemini, Grok, Perplexity, Mistral, DeepSeek, Cohere, Qwen
  • Dashboard — Visitors, sessions, pageviews, bounce rate, duration, conversions
  • Top pages — With scroll depth and time on page
  • Referrer analysis — Traffic sources with bounce rates
  • Device breakdown — Desktop, mobile, tablet with browser and OS
  • UTM campaign tracking — Source, medium, campaign performance
  • Conversion goals — Page view, form submit, or click triggers
  • Data export — JSON and CSV download for external analysis
  • Multilingual — English and Japanese (switchable in admin)

FPAI Pro (separate plugin)

FPAI Pro is a separate plugin that extends FPAI with advanced event tracking. It is distributed independently from fpai.orora.co.jp and is not part of this plugin.

External Services

This plugin optionally connects to external AI services. No data is sent to any external service without your explicit action (entering an API key and submitting a query).

AI Analysis (Optional)

When you enter your own API key and submit a query in the AI Analysis page, your site’s aggregated analytics data (session counts, top pages, referrers — no raw visitor data or PII) is sent to the AI provider you selected. Your API key is stored locally in your WordPress database and is never transmitted to FPAI or anyone other than your chosen provider.

This plugin supports the following AI providers (all optional, user-configured):

No other external connections are made. All assets including Chart.js are bundled with the plugin. No CDNs, tracking pixels, or telemetry.

Instalacja

  1. Upload the plugin folder to /wp-content/plugins/
  2. Activate through the WordPress Plugins menu
  3. Go to FPAI > Settings to configure tracking options
  4. Optionally add your AI API key (Claude, GPT, etc.) for built-in analysis
  5. Visit your site — tracking starts automatically

Najczęściej zadawane pytania

Does this replace Google Analytics?

Yes. FPAI tracks pageviews, sessions, referrers, UTM parameters, devices, scroll depth, and more. You can also ask AI to analyze your data in natural language.

Where is the data stored?

All data is stored in your WordPress MySQL database. Nothing is sent to external servers for tracking.

Do I need an AI API key?

No. The AI chat feature is optional. FPAI works as a standalone analytics tool without it. If you want AI analysis, you provide your own API key from any supported provider.

Does this use cookies?

No cookies are set on your visitors’ browsers. Session management uses localStorage — or nothing at all in Storage-less mode. (The admin dashboard stores a UI language preference cookie for logged-in administrators only.)

Will this slow down my site?

The tracker script is lightweight (~10KB / ~4KB compressed for the free plugin, ~18KB / ~6KB for Pro) and loads in the footer without blocking rendering. Data is sent via the Beacon API in the background with no impact on user experience.

Is this GDPR compliant?

FPAI is designed around GDPR principles: no cookies, no external tracking, no raw IP addresses stored — and Storage-less Mode tracks EU visitors with nothing stored on the device, addressing device-storage consent rules such as Section 25 of the German TDDDG. As always, consult your legal advisor for your specific compliance requirements.

Recenzje

2026-04-27
このプラグインはかなり取っつきやすいです。管理画面内で、アクセス状況の確認からAIへの質問まで完結するので、数字を読み解くのが苦手な方には相性がいいと感じました。既存のアクセス解析ツールのように画面遷移や専門用語に振り回されにくく、まず見たい数字と改善のヒントに早くたどり着ける点が良いと思います。
Przeczytaj 1 recenzje

Kontrybutorzy i deweloperzy

„FPAI – First-Party AI Analytics” jest oprogramowaniem open source. Poniższe osoby miały wkład w rozwój wtyczki.

Zaangażowani

Rejestr zmian

1.1.1

  • Fixed: tracking on cached pages could silently stop after 12-24h — the collect endpoint no longer depends on an expiring WP nonce. It now validates a strict per-event schema (allowed keys, types, length caps), enforces a total payload cap, and rejects cross-origin browser submissions, alongside the existing per-IP rate limit
  • Privacy: the sessions table no longer stores an IP-derived hash or the raw User-Agent string in any tracking mode; the User-Agent is parsed transiently for device/browser/OS and then discarded. An automatic, batched migration blanks both columns in existing rows
  • Fixed: session duration now measures the sum of each page’s actual visible time (background-tab time is excluded); previously it recorded only the longest single page time. Exit reporting is idempotent per page load, so duplicate/late beacons can no longer double-count
  • Fixed: an exit event arriving after a long idle no longer fabricates an empty session
  • Fixed: video play/pause events were sent by the tracker but rejected server-side; JS error and performance events were accepted but stored with their details discarded. All Pro event types now store their contract fields (see docs/EVENT_CONTRACT.md)
  • Fixed: the copy / media / JS-error / performance tracking toggles had no effect; all eight event toggles are now enforced in both the tracker and the collect endpoint
  • Fixed: activating Free and Pro together could fail fatally; the second edition now detects the conflict before loading, deactivates itself safely and explains what to do
  • Changed: on a lapsed or offline Pro license, basic tracking (clicks, outbound, form submits) continues at the Free level, and the 90-day purge never runs while a license key is stored — an expired card cannot destroy unlimited-retention history
  • Changed: license grace policy — network failures are tolerated for 7 days after the last successful verification (lifetime licenses up to 180 days offline); an explicit invalid/expired response is applied immediately
  • Security: the Pro update package is now fetched via an authenticated POST (license key never appears in a URL), with size caps and ZIP validation; the Gemini API key moved from the URL query string to a request header
  • Security: CSV exports neutralize spreadsheet formula injection in visitor-supplied text
  • Changed: DeepSeek model updated to deepseek-v4-flash (deepseek-chat was scheduled for discontinuation 2026-07-24)
  • Added: uninstall cleanup — API/license keys are always removed on uninstall; an opt-in Danger Zone setting deletes all tables and settings too
  • Changed: the tracker batches events (2s window) and retries transient network failures once
  • Added: collection-method tracking — every row records whether it was collected in standard or storage-less mode (determined server-side); shown in the dashboard and included in exports
  • Added: a bot / bulk-submission filter (Off / Standard / Strong, default Standard) that discards automated traffic before it is ever stored; payload-size, event-count and per-IP rate safety limits stay enforced at every setting
  • Changed: data export now streams directly in batches with no temporary files and constant memory — a date range within the last 30 days, or a whole calendar month for older data
  • Fixed: behavioral events now carry a stable id, so a network retry can no longer store the same event twice
  • Fixed: a conversion goal with an empty condition is rejected on save instead of matching every page
  • Fixed: on-page time longer than an hour is now shown as H:MM:SS instead of wrapping
  • Changed: if a visitor’s browser blocks storage, that page automatically falls back to storage-less (nothing is stored; pseudonymous ids are derived server-side)
  • Changed: the storage-less daily salt is stored per day and registered atomically (add_option); the loser of a race reads the winner’s value (never diverging), and every past day’s salt is removed on rotation so it cannot be recomputed. Rate limiting moved to a dedicated expiring table keyed by a per-minute rotating HMAC (no fixed IP hash)
  • Note: on WordPress Multisite, v1.1.1 is not officially supported (network activation is not blocked)

1.1.0

  • Added: Tracking Mode setting — Standard / Auto / Storage-less. Storage-less tracking keeps nothing on the visitor’s device: pseudonymous IDs are derived server-side from a daily-rotating salt, so visitors cannot be linked across days
  • Auto mode applies storage-less tracking to EU visitors only (detected by browser timezone) and standard tracking to everyone else
  • New installs default to Auto; existing installs keep Standard so metrics are unchanged
  • Fixed: form-type conversion goals matched every form submission (the evaluator read a field the settings never saved); they now match the saved matcher against the submitted form ID
  • Security: CF-Connecting-IP is now honored only when the request verifiably comes from a Cloudflare edge, and X-Forwarded-For / X-Real-IP are no longer trusted — prevents rate-limit bypass via spoofed headers
  • Added (free plugin): basic click and form-submit events, so click/form conversion goals now work on the free plugin as documented. Advanced event tracking remains a Pro feature
  • Fixed: click/form/page_exit events that arrive before any pageview now create the session row instead of being orphaned

1.0.4

  • Fixed: Click-type conversion goals were never recorded (the click trigger had no evaluation logic). Click goals now match against the clicked element’s text, href, id, and class.
  • Changed: Each conversion goal is now counted at most once per session to prevent double counting
  • Added: Sessions by Hour of Day chart on the dashboard, and hourly distribution data in AI analysis
  • Changed: Updated AI model IDs to current versions (OpenAI gpt-5.6, Gemini gemini-pro-latest, Grok grok-4.6)

1.0.3

  • Added: Light mode toggle in AI Analysis — reduces token usage by sending a smaller data summary and shorter conversation history (analysis will be less detailed)

1.0.2

  • Updated AI model IDs to latest versions (Claude Sonnet 5, GPT-4.1, Cohere Command A, etc.)

1.0.1

  • Security: hardened the analytics collection endpoint

1.0.0

  • Initial release
  • First-party tracking (pageviews, sessions, scroll depth, clicks, forms, media, errors)
  • Analytics dashboard with Chart.js
  • AI analysis chat with 9 provider support
  • CSV/JSON data export
  • Conversion goal tracking (pageview, form, click triggers)
  • Multilingual admin (English / Japanese)
  • Rate-limited collection endpoint