=== VisitorType ===
Contributors: stitchengineer
Tags: ai, bots, crawlers, tag manager, analytics
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Detect AI crawlers, assistants, and agents visiting your site — and serve them differently with tag-manager rules.

== Description ==

Not all of your visitors are human anymore. GPTBot, ClaudeBot, PerplexityBot, and AI assistants
acting for real users visit your site every day — invisible to normal analytics.

VisitorType classifies every visit (human, AI crawler, AI search, AI assistant, AI browser
agent), lets you fire different tags for each audience, and shows you which AI platforms read —
and refer — your content.

This plugin connects your WordPress site in one click:

* **Browser snippet injection** — fires your tags, catches AI assistants and agentic browsers,
  measures engagement (time on page, scroll), and detects humans referred by ChatGPT,
  Perplexity, and Gemini (including visits GA4 buries in "Direct").
* **Server-side tracking** — reports every request in the background (zero added latency), so
  AI crawlers that never execute JavaScript are captured too.

You need a free VisitorType account and a container ID. The snippet is cookieless, stores no
visitor IP addresses, strips query strings before storage, and honors Global Privacy Control.

== Installation ==

1. Install and activate the plugin.
2. Create a container in your VisitorType dashboard and copy its ID (AITM-XXXXXXX).
3. Go to Settings → VisitorType, paste your host URL and container ID, save.
4. Visit your site once, then open the Analytics tab in your dashboard.

== Frequently Asked Questions ==

= Does this slow down my site? =
No. The snippet is ~4 kB and loads async; server-side reporting is fire-and-forget
(non-blocking) and adds no latency to page rendering.

= Do I need a cookie banner for this? =
The snippet sets no cookies. It uses a per-tab session identifier and honors GPC/DNT. See the
privacy documentation in your dashboard; consult your own legal advisor for your site.

= Where is the data stored? =
In your VisitorType account. Events auto-delete after your plan's retention period.

== Changelog ==

= 0.1.0 =
* Initial release: snippet injection, server-side collection, settings page.