=== Snitcher Tracker ===
Contributors: snitcher
Tags: analytics, lead generation, visitor identification, B2B, tracking
Requires at least: 5.8
Tested up to: 7.0
Stable tag: 1.0.1
Requires PHP: 7.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Identify the companies visiting your website and turn anonymous traffic into pipeline.

== Description ==

Snitcher reveals which companies are visiting your WordPress site, what pages they're looking at, and how they got there. No more guessing who's interested - see real buying intent as it happens and act on it.

This plugin adds the Snitcher tracking snippet to your site. Connect your Snitcher account via OAuth or enter your Tracking Script ID manually.

**What you get:**

* See which companies are browsing your site in real time
* Track what pages and content they care about
* Spot high-intent accounts before they fill out a form
* Route leads to your CRM, Slack, or any tool in your stack automatically
* Measure which campaigns actually drive pipeline

**Privacy built in:**

Snitcher identifies companies, not individuals. The plugin includes a cookie consent mode that works out of the box with popular consent tools like Cookiebot, CookieYes, OneTrust, and Transcend. See the [cookie consent documentation](https://docs.snitcher.com/product/tracker/cookie-consent) for the current list of supported providers.

You'll need a [Snitcher account](https://app.snitcher.com/register) to use this plugin. Check out [snitcher.com](https://www.snitcher.com) to learn more.

== External Services ==

This plugin connects to the Snitcher platform (snitcher.com) in the following ways:

**Tracking snippet (always active when configured):**
The plugin injects a JavaScript tracking snippet that loads from `cdn.snitcher.com` and sends pageview data to `radar.snitcher.com`. This is the core functionality of the plugin and runs on every page of your site when a Tracking Script ID is configured.

**OAuth connection (optional, during setup only):**
When using the "Connect with Snitcher" setup flow, the plugin communicates with `app.snitcher.com` to register an OAuth client, authenticate your account, and fetch your workspace and tracking script configuration. This only happens during the initial setup and when changing workspaces.

* [Snitcher Terms of Service](https://www.snitcher.com/terms-conditions)
* [Snitcher Privacy Policy](https://www.snitcher.com/privacy-policy)

== Installation ==

1. Upload the `snitcher-tracker` folder to `/wp-content/plugins/`, or install directly through the WordPress plugin screen.
2. Activate the plugin through the "Plugins" screen in WordPress.
3. Go to **Settings > Snitcher**.
4. Connect your Snitcher account using the "Connect with Snitcher" button. If your site's domain matches a workspace, it will be selected automatically. Otherwise, pick the right workspace from the dropdown.
5. Alternatively, switch to the "Configure manually" tab and enter your Tracking Script ID.
6. Choose whether your site has a cookie banner.
7. Save changes. The tracking snippet is now live on your site.

== Frequently Asked Questions ==

= Where do I find my Tracking Script ID? =

Log in to your [Snitcher dashboard](https://app.snitcher.com), head to your tracking script settings, and grab the Tracking Script ID from there. Alternatively, use the OAuth connection to configure it automatically.

= Do I need to touch any code? =

Nope. Just activate the plugin, connect your account or enter your Tracking Script ID, and you're done.

= How does the cookie consent option work? =

Visitors are always identified regardless of consent. When you select "Yes, I have a cookie banner", sessions are only stitched together after the visitor gives consent. If you use a supported consent platform such as Cookiebot, CookieYes, OneTrust, or Transcend, Snitcher picks up their consent signals automatically ([current list](https://docs.snitcher.com/product/tracker/cookie-consent)). If you use something else, enter the name of the cookie or localStorage key your banner sets once a visitor accepts — Snitcher watches both and grants consent as soon as it appears. You can also call `Snitcher.giveCookieConsent()` directly from your own JavaScript when the visitor opts in.

= What happens when I deactivate the plugin? =

Deactivating the plugin removes all of its settings, including your Tracking Script ID and Snitcher account connection. If you reactivate it later, you'll need to connect again. Uninstalling the plugin removes the same data.

= Does this slow down my site? =

The snippet loads asynchronously and doesn't block page rendering. It's lightweight and designed to have zero impact on your site's performance.

= Does Snitcher track individual people? =

No. Snitcher identifies companies visiting your site, not individual users.

== Changelog ==

= 1.0.1 =
* Added CookieYes to the automatically detected consent platforms
* The tracking loader (assets/js/tracker.js) now ships unminified as human-readable source

= 1.0.0 =
* Initial release
* OAuth connection for automatic workspace and tracking script configuration
* Manual Tracking Script ID configuration as alternative setup method
* Automatic tracking snippet injection
* Cookie consent mode with automatic detection for Cookiebot, OneTrust, and Transcend
* Custom cookie banner support via a consent cookie or localStorage key
* All plugin settings are removed on deactivation and uninstall

== Upgrade Notice ==

= 1.0.1 =
Adds CookieYes consent detection and ships the tracking loader as readable source.

= 1.0.0 =
Initial release of the Snitcher plugin for WordPress.
