=== Octanist ===
Contributors: octanist
Tags: tracking, analytics, forms, leads, conversions
Requires at least: 6.0
Tested up to: 7.0
Stable tag: 4.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

First-party proxy for the Octanist pixel. Serves the tracking script from your own domain and captures form submissions server-side.

== Description ==

Octanist is a conversion tracking platform that bridges online marketing with offline sales. This plugin is the official connector for WordPress.

### How it works

The plugin acts as a first-party proxy for the Octanist pixel:

*   **Pixel proxy.** The tracking script is served from your own WordPress site (`/wp-json/oct/p`) and transparently fetched from Octanist in the background. No third-party domain, no DNS setup, no ad-blocker signal to match on.
*   **Event proxy.** Events from the pixel POST to `/wp-json/oct/e`; the plugin forwards them to Octanist server-side, carrying along the real visitor IP, country, and user-agent.
*   **Server-side form capture.** Form submissions from Gravity Forms, Contact Form 7, WPForms, Ninja Forms, Elementor Pro, Fluent Forms, Formidable Forms, Forminator, SureForms, and Divi Contact Form are captured server-side via action hooks, more reliable than client-side interception, and works with AJAX submissions.

### Setup

1. Install and activate the plugin.
2. Go to **Settings → Octanist**.
3. Paste your measurement ID.
4. Done.

That's it. No field mapping. No DNS configuration. Listener mode and consent mode are optional toggles.

### Data privacy

*   **Octanist account required.** You need an active account at octanist.com.
*   **You are the data controller.** Consent capture and privacy-policy disclosure are your responsibility. A consent management platform (CMP) is recommended.

== Installation ==

1. Upload the `octanist` folder to `/wp-content/plugins/`.
2. Activate the plugin via the Plugins screen.
3. Go to **Settings → Octanist** and paste your measurement ID.

== Frequently Asked Questions ==

= Do I need a custom subdomain or DNS setup? =

No. The plugin proxies the pixel through your WordPress site itself, so everything is first-party automatically.

= Which form plugins are supported? =

Gravity Forms, Contact Form 7, WPForms, Ninja Forms, Elementor Pro Forms, Fluent Forms, Formidable Forms, Forminator, SureForms, and Divi Contact Form.

= How are form submissions captured? =

Via server-side action hooks on each supported plugin, not by intercepting the form in the browser. This works with AJAX forms and is resilient to theme/plugin conflicts.

= What happens if the Octanist service is temporarily unreachable? =

Form submissions are forwarded immediately with a short timeout. If Octanist is temporarily unreachable, the plugin queues the submission and retries it with WP-Cron. A health panel in settings shows the last activity and queued retry count.

== Changelog ==

= 4.0.0 =
*   **RELEASE:** Stable release for the Octanist Pixel rollout.
*   **COMPATIBILITY:** Tested up to WordPress 7.0.

= 3.0.0 =
*   **MAJOR REWRITE.** The plugin is now a first-party proxy for the new Octanist pixel.
*   **NEW:** Pixel and event traffic proxied through WordPress (`/wp-json/oct/p` and `/wp-json/oct/e`), fully first-party, no custom domain required.
*   **NEW:** Server-side form capture via action hooks for Gravity Forms, Contact Form 7, WPForms, Ninja Forms, Elementor Pro, Fluent Forms, Formidable Forms, Forminator, SureForms, and Divi Contact Form.
*   **NEW:** Failed server-side form forwards are queued and retried with WP-Cron.
*   **NEW:** One-field setup. Paste your measurement ID and you're done.
*   **NEW:** Client-signal forwarding (IP, country, UA, referer, accept-language) so upstream attribution stays accurate even when the request is proxied.
*   **REMOVED:** Field mapping, AJAX/standard submission mode toggle, debug mode, datalayer option. All gone.
*   **MIGRATION:** v2 field-mapping settings are preserved as `octanist_settings_legacy` for one release; a one-time admin notice explains the new setup.

= 2.0.1 =
*   **FIX:** Plugin settings are no longer deleted on deactivation.
*   **IMPROVEMENT:** Tested up to WordPress 6.9.4.

= 2.0.0 =
*   **MAJOR REFACTOR:** WordPress Settings API, new UI, dynamic field mappings, debug mode.

= 1.0.0 =
*   Initial release.
