| 开发者 | inglewood |
|---|---|
| 更新时间 | 2026年10月30日 04:00 |
| PHP版本: | 7.0 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
claude mcp add command connects Claude Code (or any MCP client) to 19 read-only, typed analytics tools at /wp-json/kantan/mcp — built on the WordPress Abilities API, no separate credential scheme, nothing writable by an agent.
Built for self-hosting
/wp-content/plugins/ directory, or install it through the Plugins screen in WordPress.No. Kantan uses browser localStorage to recognise returning visitors, never cookies. No consent banner is required in most jurisdictions, and no cross-site tracking is possible.
All data is stored in your WordPress database in wp_kantan_* tables, with daily aggregates in a local SQLite file under wp-content/uploads/kantan/. Nothing is sent to external servers.
The tracking script categorizes referrers automatically:
No. The tracking script loads asynchronously after page content and uses sendBeacon for exit tracking. There are no blocking requests, no third-party domains, and no external CDNs. Performance impact is well under 10ms.
Kantan is designed for privacy-first compliance under modern privacy law: no cookies, no IP storage, no cross-site tracking, and — unless you switch on the optional Attribution Webhook — no data leaves your server. In most jurisdictions you do not need a consent banner to use it. We're not lawyers — confirm with yours — but architecturally the tool is built for privacy-first compliance rather than retrofitting it.
Yes. The tracking script is loaded via standard wp_enqueue_script and runs client-side, so cached pages still record visits correctly. The only thing to watch for is plugins that delay or defer JavaScript so aggressively that visitors leave before the script fires — exclude kantan-analytics/assets/tracking.js from any "delay JS until interaction" rule and you'll be fine.
Not currently. Kantan starts tracking the moment you activate it, and historical GA data has a different structure that doesn't map cleanly. If GA→Kantan import is something you need, drop us a note at https://trykantan.com.
Nothing — your data stays in the database. Deactivating just stops new tracking and hides the dashboard. If you uninstall (delete) the plugin, the tables remain unless you explicitly drop them; this is standard WordPress behavior and lets you reactivate without losing history.
Logged-in admins are excluded by default. The Settings tab also lets you exclude specific IP addresses (one per line). Common bot user-agents are filtered automatically.
A downloadable .md file from the dashboard that turns any AI coding agent (Claude Code, Gemini CLI, and compatible tools) into a read-only analyst for your site. It uses a WordPress application password you generate, calls the REST API, and answers questions in plain English. It only reads — nothing it sees leaves your terminal unless you ask.
Yes — install at the network level or per-site. Each site gets its own tables and its own dashboard. There's no aggregated network-wide view yet; that's on the roadmap.
@graph blocks and @type lists, so BlogPosting and other Article types count as Article. The entity check reads the first real paragraph after the title instead of a byline, and also accepts the names in your Organization schema. The answer length check counts characters, not bytes./kantan/v1/crawlers and the MCP tool get-ai-crawlers take crawler, type, page, since and until filters. include_hits returns the individual hits, newest first, with limit and offset. Now you can see which pages ChatGPT fetched before a lead arrived."recorded": false with the reason, instead of a plain success.visit=new or visit=returning on journeys and visitor profiles, and the overview returns the new fields.role="main" and have no <main> tag, the AI answer readiness scan on the SEO tab read only the first few lines of each page. It missed the headings, questions and answers below them. The scan now reads the whole content area. Run the scan again to update your scores.get-404s and REST route GET /kantan/v1/404s.get-analytics-overview, get-traffic-sources and get-conversions, because counts were sent as text. They are now numbers.defer.assets/tracking.js and assets/js/.pagehide, which iOS Safari and in-app browsers send more reliably.beforeunload, so Firefox can keep your pages in its back/forward cache.limit and days values on the REST API are reduced to safe maximums, and only administrators and dashboard viewers can connect to the MCP server.utm_medium=email was previously reported as direct, because email clicks arrive with no referrer. Any visit carrying a utm_medium is now attributed to it, for the whole visit rather than just the landing page.ct, HubSpot's _hsenc/_hsmi and newer ad click ids are now stripped, and cleanup also runs on the server so it works even when a cached script misses it. Existing split rows are merged once on upgrade./checkout (or a full URL on your own site) matches by path prefix; previously a same-site rule either never matched absolute link URLs or — if it contained your own domain name — counted every internal link click as a conversion. Outbound-domain rules are unchanged./wp-json/kantan/mcp, built on the WordPress Abilities API. Kantan SEO's tools join the same server automatically.kantan_view_dashboard capability can view the dashboard and its data without manage_options — every write, scan, and sync still requires manage_options. The dashboard menu capability is filterable via kantan_dashboard_capability. Inert on normal sites; powers a public read-only demo.Update URI header so the "Enable auto-updates" toggle appears for Kantan Analytics in the Plugins list. (The WordPress.org build omits this header so wp.org continues to own updates there.)_backfill conversion-type display shim have all been removed.GET /kantan/v1/realtime?window=5 — returns { count, window_minutes, visitors, timestamp }. Each visitor row includes the most recent pageview (current page), generated display name, traffic source, session age, and seconds since last activity./visitors and /journeys endpoints also expose the new fields, so the Claude Code agent and recommendations engine can attribute behavior to campaigns._backfill type suffix. Idempotent — safe to run multiple times.visitor_id column added to wp_kantan_conversions so attribution survives beyond the 90-day raw-data retention window.kantan_visitor_id alongside kantan_session_id on all detected forms (CF7, WPForms, Gravity, Formidable, Ninja, Elementor Pro, Fluent, Forminator).test_id and variant_id from a companion split-testing plugin.kantan_pageview_tracked action hook fired after each pageview insert.test_id and variant_id columns to the pageviews table.